mirror of
https://github.com/hyprwm/aquamarine.git
synced 2025-12-28 04:00:06 +01:00
backend: Fix compiler warnings (#160)
This commit is contained in:
parent
1c8fa0bf04
commit
484b732195
4 changed files with 4 additions and 8 deletions
|
|
@ -102,8 +102,7 @@ Aquamarine::CBackend::~CBackend() {
|
||||||
bool Aquamarine::CBackend::start() {
|
bool Aquamarine::CBackend::start() {
|
||||||
log(AQ_LOG_DEBUG, "Starting the Aquamarine backend!");
|
log(AQ_LOG_DEBUG, "Starting the Aquamarine backend!");
|
||||||
|
|
||||||
bool fallback = false;
|
int started = 0;
|
||||||
int started = 0;
|
|
||||||
|
|
||||||
auto optionsForType = [this](eBackendType type) -> SBackendImplementationOptions {
|
auto optionsForType = [this](eBackendType type) -> SBackendImplementationOptions {
|
||||||
for (auto const& o : implementationOptions) {
|
for (auto const& o : implementationOptions) {
|
||||||
|
|
@ -118,7 +117,6 @@ bool Aquamarine::CBackend::start() {
|
||||||
|
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
log(AQ_LOG_ERROR, std::format("Requested backend ({}) could not start, enabling fallbacks", backendTypeToName(implementations.at(i)->type())));
|
log(AQ_LOG_ERROR, std::format("Requested backend ({}) could not start, enabling fallbacks", backendTypeToName(implementations.at(i)->type())));
|
||||||
fallback = true;
|
|
||||||
if (optionsForType(implementations.at(i)->type()).backendRequestMode == AQ_BACKEND_REQUEST_MANDATORY) {
|
if (optionsForType(implementations.at(i)->type()).backendRequestMode == AQ_BACKEND_REQUEST_MANDATORY) {
|
||||||
log(AQ_LOG_CRITICAL, std::format("Requested backend ({}) could not start and it's mandatory, cannot continue!", backendTypeToName(implementations.at(i)->type())));
|
log(AQ_LOG_CRITICAL, std::format("Requested backend ({}) could not start and it's mandatory, cannot continue!", backendTypeToName(implementations.at(i)->type())));
|
||||||
implementations.clear();
|
implementations.clear();
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,6 @@ void Aquamarine::CHeadlessBackend::dispatchTimers() {
|
||||||
void Aquamarine::CHeadlessBackend::updateTimerFD() {
|
void Aquamarine::CHeadlessBackend::updateTimerFD() {
|
||||||
long long lowestNs = TIMESPEC_NSEC_PER_SEC * 240 /* 240s, 4 mins */;
|
long long lowestNs = TIMESPEC_NSEC_PER_SEC * 240 /* 240s, 4 mins */;
|
||||||
const auto clocknow = std::chrono::steady_clock::now();
|
const auto clocknow = std::chrono::steady_clock::now();
|
||||||
bool any = false;
|
|
||||||
|
|
||||||
for (auto const& t : timers.timers) {
|
for (auto const& t : timers.timers) {
|
||||||
auto delta = std::chrono::duration_cast<std::chrono::microseconds>(t.when - clocknow).count() * 1000 /* µs -> ns */;
|
auto delta = std::chrono::duration_cast<std::chrono::microseconds>(t.when - clocknow).count() * 1000 /* µs -> ns */;
|
||||||
|
|
|
||||||
|
|
@ -620,7 +620,6 @@ void Aquamarine::CSession::handleLibinputEvent(libinput_event* e) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_TOUCH_FRAME: {
|
case LIBINPUT_EVENT_TOUCH_FRAME: {
|
||||||
auto te = libinput_event_get_touch_event(e);
|
|
||||||
hlDevice->touch->events.frame.emit();
|
hlDevice->touch->events.frame.emit();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -709,7 +708,8 @@ void Aquamarine::CSession::handleLibinputEvent(libinput_event* e) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fallthrough. If this is proximity in, also process axis.
|
// If this is proximity in, also process axis.
|
||||||
|
[[fallthrough]];
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_TABLET_TOOL_AXIS: {
|
case LIBINPUT_EVENT_TABLET_TOOL_AXIS: {
|
||||||
auto tte = libinput_event_get_tablet_tool_event(e);
|
auto tte = libinput_event_get_tablet_tool_event(e);
|
||||||
|
|
|
||||||
|
|
@ -542,8 +542,7 @@ bool Aquamarine::CWaylandOutput::test() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Aquamarine::CWaylandOutput::commit() {
|
bool Aquamarine::CWaylandOutput::commit() {
|
||||||
Vector2D pixelSize = {};
|
Vector2D pixelSize = {};
|
||||||
uint32_t refreshRate = 0;
|
|
||||||
|
|
||||||
if (state->internalState.customMode)
|
if (state->internalState.customMode)
|
||||||
pixelSize = state->internalState.customMode->pixelSize;
|
pixelSize = state->internalState.customMode->pixelSize;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue