summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp99
1 files changed, 50 insertions, 49 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 078edc15..764c394e 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -56,7 +56,7 @@ CInputManager::CInputManager() {
if (wl_resource_get_client(event.pMgr->resource()) != g_pSeatManager->m_state.pointerFocusResource->client())
return;
- Debug::log(LOG, "cursorImage request: shape {} -> {}", sc<uint32_t>(event.shape), event.shapeName);
+ Log::logger->log(Log::DEBUG, "cursorImage request: shape {} -> {}", sc<uint32_t>(event.shape), event.shapeName);
m_cursorSurfaceInfo.wlSurface->unassign();
m_cursorSurfaceInfo.vHotspot = {};
@@ -275,7 +275,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse, st
return;
} else
- Debug::log(ERR, "BUG THIS: Null SURF/CONSTRAINT in mouse refocus. Ignoring constraints. {:x} {:x}", rc<uintptr_t>(SURF.get()), rc<uintptr_t>(CONSTRAINT.get()));
+ Log::logger->log(Log::ERR, "BUG THIS: Null SURF/CONSTRAINT in mouse refocus. Ignoring constraints. {:x} {:x}", rc<uintptr_t>(SURF.get()),
+ rc<uintptr_t>(CONSTRAINT.get()));
}
if (PMONITOR != Desktop::focusState()->monitor() && (*PMOUSEFOCUSMON || refocus) && m_forcedFocus.expired())
@@ -676,7 +677,7 @@ void CInputManager::onMouseButton(IPointer::SButtonEvent e) {
}
void CInputManager::processMouseRequest(const CSeatManager::SSetCursorEvent& event) {
- Debug::log(LOG, "cursorImage request: surface {:x}", rc<uintptr_t>(event.surf.get()));
+ Log::logger->log(Log::DEBUG, "cursorImage request: surface {:x}", rc<uintptr_t>(event.surf.get()));
if (event.surf != m_cursorSurfaceInfo.wlSurface->resource()) {
m_cursorSurfaceInfo.wlSurface->unassign();
@@ -725,13 +726,13 @@ eClickBehaviorMode CInputManager::getClickMode() {
void CInputManager::setClickMode(eClickBehaviorMode mode) {
switch (mode) {
case CLICKMODE_DEFAULT:
- Debug::log(LOG, "SetClickMode: DEFAULT");
+ Log::logger->log(Log::DEBUG, "SetClickMode: DEFAULT");
m_clickBehavior = CLICKMODE_DEFAULT;
g_pHyprRenderer->setCursorFromName("left_ptr", true);
break;
case CLICKMODE_KILL:
- Debug::log(LOG, "SetClickMode: KILL");
+ Log::logger->log(Log::DEBUG, "SetClickMode: KILL");
m_clickBehavior = CLICKMODE_KILL;
// remove constraints
@@ -831,7 +832,7 @@ void CInputManager::processMouseDownKill(const IPointer::SButtonEvent& e) {
g_pCompositor->vectorToWindowUnified(getMouseCoordsInternal(), Desktop::View::RESERVED_EXTENTS | Desktop::View::INPUT_EXTENTS | Desktop::View::ALLOW_FLOATING);
if (!PWINDOW) {
- Debug::log(ERR, "Cannot kill invalid window!");
+ Log::logger->log(Log::ERR, "Cannot kill invalid window!");
break;
}
@@ -960,7 +961,7 @@ void CInputManager::newKeyboard(SP<IKeyboard> keeb) {
setupKeyboard(PNEWKEYBOARD);
- Debug::log(LOG, "New keyboard created, pointers Hypr: {:x}", rc<uintptr_t>(PNEWKEYBOARD.get()));
+ Log::logger->log(Log::DEBUG, "New keyboard created, pointers Hypr: {:x}", rc<uintptr_t>(PNEWKEYBOARD.get()));
}
void CInputManager::newKeyboard(SP<Aquamarine::IKeyboard> keyboard) {
@@ -968,7 +969,7 @@ void CInputManager::newKeyboard(SP<Aquamarine::IKeyboard> keyboard) {
setupKeyboard(PNEWKEYBOARD);
- Debug::log(LOG, "New keyboard created, pointers Hypr: {:x} and AQ: {:x}", rc<uintptr_t>(PNEWKEYBOARD.get()), rc<uintptr_t>(keyboard.get()));
+ Log::logger->log(Log::DEBUG, "New keyboard created, pointers Hypr: {:x} and AQ: {:x}", rc<uintptr_t>(PNEWKEYBOARD.get()), rc<uintptr_t>(keyboard.get()));
}
void CInputManager::newVirtualKeyboard(SP<CVirtualKeyboardV1Resource> keyboard) {
@@ -976,7 +977,7 @@ void CInputManager::newVirtualKeyboard(SP<CVirtualKeyboardV1Resource> keyboard)
setupKeyboard(PNEWKEYBOARD);
- Debug::log(LOG, "New virtual keyboard created at {:x}", rc<uintptr_t>(PNEWKEYBOARD.get()));
+ Log::logger->log(Log::DEBUG, "New virtual keyboard created at {:x}", rc<uintptr_t>(PNEWKEYBOARD.get()));
}
void CInputManager::setupKeyboard(SP<IKeyboard> keeb) {
@@ -987,7 +988,7 @@ void CInputManager::setupKeyboard(SP<IKeyboard> keeb) {
try {
keeb->m_hlName = getNameForNewDevice(keeb->m_deviceName);
} catch (std::exception& e) {
- Debug::log(ERR, "Keyboard had no name???"); // logic error
+ Log::logger->log(Log::ERR, "Keyboard had no name???"); // logic error
}
keeb->m_events.destroy.listenStatic([this, keeb = keeb.get()] {
@@ -997,7 +998,7 @@ void CInputManager::setupKeyboard(SP<IKeyboard> keeb) {
return;
destroyKeyboard(PKEEB);
- Debug::log(LOG, "Destroyed keyboard {:x}", rc<uintptr_t>(keeb));
+ Log::logger->log(Log::DEBUG, "Destroyed keyboard {:x}", rc<uintptr_t>(keeb));
});
keeb->m_keyboardEvents.key.listenStatic([this, keeb = keeb.get()](const IKeyboard::SKeyEvent& event) {
@@ -1062,7 +1063,7 @@ void CInputManager::applyConfigToKeyboard(SP<IKeyboard> pKeyboard) {
const auto HASCONFIG = g_pConfigManager->deviceConfigExists(devname);
- Debug::log(LOG, "ApplyConfigToKeyboard for \"{}\", hasconfig: {}", devname, sc<int>(HASCONFIG));
+ Log::logger->log(Log::DEBUG, "ApplyConfigToKeyboard for \"{}\", hasconfig: {}", devname, sc<int>(HASCONFIG));
const auto REPEATRATE = g_pConfigManager->getDeviceInt(devname, "repeat_rate", "input:repeat_rate");
const auto REPEATDELAY = g_pConfigManager->getDeviceInt(devname, "repeat_delay", "input:repeat_delay");
@@ -1088,11 +1089,11 @@ void CInputManager::applyConfigToKeyboard(SP<IKeyboard> pKeyboard) {
if (PERM == PERMISSION_RULE_ALLOW_MODE_PENDING) {
const auto PROMISE = g_pDynamicPermissionManager->promiseFor(-1, pKeyboard->m_hlName, PERMISSION_TYPE_KEYBOARD);
if (!PROMISE)
- Debug::log(ERR, "BUG THIS: No promise for client permission for keyboard");
+ Log::logger->log(Log::ERR, "BUG THIS: No promise for client permission for keyboard");
else {
PROMISE->then([k = WP<IKeyboard>{pKeyboard}](SP<CPromiseResult<eDynamicPermissionAllowMode>> r) {
if (r->hasError()) {
- Debug::log(ERR, "BUG THIS: No permission returned for keyboard");
+ Log::logger->log(Log::ERR, "BUG THIS: No permission returned for keyboard");
return;
}
@@ -1109,7 +1110,7 @@ void CInputManager::applyConfigToKeyboard(SP<IKeyboard> pKeyboard) {
if (NUMLOCKON == pKeyboard->m_numlockOn && REPEATDELAY == pKeyboard->m_repeatDelay && REPEATRATE == pKeyboard->m_repeatRate && RULES == pKeyboard->m_currentRules.rules &&
MODEL == pKeyboard->m_currentRules.model && LAYOUT == pKeyboard->m_currentRules.layout && VARIANT == pKeyboard->m_currentRules.variant &&
OPTIONS == pKeyboard->m_currentRules.options && FILEPATH == pKeyboard->m_xkbFilePath) {
- Debug::log(LOG, "Not applying config to keyboard, it did not change.");
+ Log::logger->log(Log::DEBUG, "Not applying config to keyboard, it did not change.");
return;
}
} catch (std::exception& e) {
@@ -1128,8 +1129,8 @@ void CInputManager::applyConfigToKeyboard(SP<IKeyboard> pKeyboard) {
g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->m_hlName + "," + LAYOUTSTR});
EMIT_HOOK_EVENT("activeLayout", (std::vector<std::any>{pKeyboard, LAYOUTSTR}));
- Debug::log(LOG, "Set the keyboard layout to {} and variant to {} for keyboard \"{}\"", pKeyboard->m_currentRules.layout, pKeyboard->m_currentRules.variant,
- pKeyboard->m_hlName);
+ Log::logger->log(Log::DEBUG, "Set the keyboard layout to {} and variant to {} for keyboard \"{}\"", pKeyboard->m_currentRules.layout, pKeyboard->m_currentRules.variant,
+ pKeyboard->m_hlName);
}
void CInputManager::newVirtualMouse(SP<CVirtualPointerV1Resource> mouse) {
@@ -1137,7 +1138,7 @@ void CInputManager::newVirtualMouse(SP<CVirtualPointerV1Resource> mouse) {
setupMouse(PMOUSE);
- Debug::log(LOG, "New virtual mouse created");
+ Log::logger->log(Log::DEBUG, "New virtual mouse created");
}
void CInputManager::newMouse(SP<IPointer> mouse) {
@@ -1145,7 +1146,7 @@ void CInputManager::newMouse(SP<IPointer> mouse) {
setupMouse(mouse);
- Debug::log(LOG, "New mouse created, pointer Hypr: {:x}", rc<uintptr_t>(mouse.get()));
+ Log::logger->log(Log::DEBUG, "New mouse created, pointer Hypr: {:x}", rc<uintptr_t>(mouse.get()));
}
void CInputManager::newMouse(SP<Aquamarine::IPointer> mouse) {
@@ -1153,7 +1154,7 @@ void CInputManager::newMouse(SP<Aquamarine::IPointer> mouse) {
setupMouse(PMOUSE);
- Debug::log(LOG, "New mouse created, pointer AQ: {:x}", rc<uintptr_t>(mouse.get()));
+ Log::logger->log(Log::DEBUG, "New mouse created, pointer AQ: {:x}", rc<uintptr_t>(mouse.get()));
}
void CInputManager::setupMouse(SP<IPointer> mauz) {
@@ -1162,15 +1163,15 @@ void CInputManager::setupMouse(SP<IPointer> mauz) {
try {
mauz->m_hlName = getNameForNewDevice(mauz->m_deviceName);
} catch (std::exception& e) {
- Debug::log(ERR, "Mouse had no name???"); // logic error
+ Log::logger->log(Log::ERR, "Mouse had no name???"); // logic error
}
if (mauz->aq() && mauz->aq()->getLibinputHandle()) {
const auto LIBINPUTDEV = mauz->aq()->getLibinputHandle();
- Debug::log(LOG, "New mouse has libinput sens {:.2f} ({:.2f}) with accel profile {} ({})", libinput_device_config_accel_get_speed(LIBINPUTDEV),
- libinput_device_config_accel_get_default_speed(LIBINPUTDEV), sc<int>(libinput_device_config_accel_get_profile(LIBINPUTDEV)),
- sc<int>(libinput_device_config_accel_get_default_profile(LIBINPUTDEV)));
+ Log::logger->log(Log::DEBUG, "New mouse has libinput sens {:.2f} ({:.2f}) with accel profile {} ({})", libinput_device_config_accel_get_speed(LIBINPUTDEV),
+ libinput_device_config_accel_get_default_speed(LIBINPUTDEV), sc<int>(libinput_device_config_accel_get_profile(LIBINPUTDEV)),
+ sc<int>(libinput_device_config_accel_get_default_profile(LIBINPUTDEV)));
}
g_pPointerManager->attachPointer(mauz);
@@ -1237,7 +1238,7 @@ void CInputManager::setPointerConfigs() {
else if (TAP_MAP == "lmr")
libinput_device_config_tap_set_button_map(LIBINPUTDEV, LIBINPUT_CONFIG_TAP_MAP_LMR);
else
- Debug::log(WARN, "Tap button mapping unknown");
+ Log::logger->log(Log::WARN, "Tap button mapping unknown");
}
const auto SCROLLMETHOD = g_pConfigManager->getDeviceString(devname, "scroll_method", "input:scroll_method");
@@ -1252,7 +1253,7 @@ void CInputManager::setPointerConfigs() {
} else if (SCROLLMETHOD == "on_button_down") {
libinput_device_config_scroll_set_method(LIBINPUTDEV, LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN);
} else {
- Debug::log(WARN, "Scroll method unknown");
+ Log::logger->log(Log::WARN, "Scroll method unknown");
}
if (g_pConfigManager->getDeviceInt(devname, "tap-and-drag", "input:touchpad:tap-and-drag") == 0)
@@ -1331,15 +1332,15 @@ void CInputManager::setPointerConfigs() {
}
libinput_config_accel_set_points(CONFIG, LIBINPUT_ACCEL_TYPE_SCROLL, scrollStep, scrollPoints.size(), scrollPoints.data());
- } catch (std::exception& e) { Debug::log(ERR, "Invalid values in scroll_points"); }
+ } catch (std::exception& e) { Log::logger->log(Log::ERR, "Invalid values in scroll_points"); }
}
libinput_config_accel_set_points(CONFIG, LIBINPUT_ACCEL_TYPE_MOTION, accelStep, accelPoints.size(), accelPoints.data());
libinput_device_config_accel_apply(LIBINPUTDEV, CONFIG);
libinput_config_accel_destroy(CONFIG);
- } catch (std::exception& e) { Debug::log(ERR, "Invalid values in custom accel profile"); }
+ } catch (std::exception& e) { Log::logger->log(Log::ERR, "Invalid values in custom accel profile"); }
} else {
- Debug::log(WARN, "Unknown acceleration profile, falling back to default");
+ Log::logger->log(Log::WARN, "Unknown acceleration profile, falling back to default");
}
const auto SCROLLBUTTON = g_pConfigManager->getDeviceInt(devname, "scroll_button", "input:scroll_button");
@@ -1351,7 +1352,7 @@ void CInputManager::setPointerConfigs() {
libinput_device_config_scroll_set_button_lock(LIBINPUTDEV,
SCROLLBUTTONLOCK == 0 ? LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_DISABLED : LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_ENABLED);
- Debug::log(LOG, "Applied config to mouse {}, sens {:.2f}", m->m_hlName, LIBINPUTSENS);
+ Log::logger->log(Log::DEBUG, "Applied config to mouse {}, sens {:.2f}", m->m_hlName, LIBINPUTSENS);
}
}
}
@@ -1362,7 +1363,7 @@ static void removeFromHIDs(WP<IHID> hid) {
}
void CInputManager::destroyKeyboard(SP<IKeyboard> pKeyboard) {
- Debug::log(LOG, "Keyboard at {:x} removed", rc<uintptr_t>(pKeyboard.get()));
+ Log::logger->log(Log::DEBUG, "Keyboard at {:x} removed", rc<uintptr_t>(pKeyboard.get()));
std::erase_if(m_keyboards, [pKeyboard](const auto& other) { return other == pKeyboard; });
@@ -1386,7 +1387,7 @@ void CInputManager::destroyKeyboard(SP<IKeyboard> pKeyboard) {
}
void CInputManager::destroyPointer(SP<IPointer> mouse) {
- Debug::log(LOG, "Pointer at {:x} removed", rc<uintptr_t>(mouse.get()));
+ Log::logger->log(Log::DEBUG, "Pointer at {:x} removed", rc<uintptr_t>(mouse.get()));
std::erase_if(m_pointers, [mouse](const auto& other) { return other == mouse; });
@@ -1399,7 +1400,7 @@ void CInputManager::destroyPointer(SP<IPointer> mouse) {
}
void CInputManager::destroyTouchDevice(SP<ITouch> touch) {
- Debug::log(LOG, "Touch device at {:x} removed", rc<uintptr_t>(touch.get()));
+ Log::logger->log(Log::DEBUG, "Touch device at {:x} removed", rc<uintptr_t>(touch.get()));
std::erase_if(m_touches, [touch](const auto& other) { return other == touch; });
@@ -1407,7 +1408,7 @@ void CInputManager::destroyTouchDevice(SP<ITouch> touch) {
}
void CInputManager::destroyTablet(SP<CTablet> tablet) {
- Debug::log(LOG, "Tablet device at {:x} removed", rc<uintptr_t>(tablet.get()));
+ Log::logger->log(Log::DEBUG, "Tablet device at {:x} removed", rc<uintptr_t>(tablet.get()));
std::erase_if(m_tablets, [tablet](const auto& other) { return other == tablet; });
@@ -1415,7 +1416,7 @@ void CInputManager::destroyTablet(SP<CTablet> tablet) {
}
void CInputManager::destroyTabletTool(SP<CTabletTool> tool) {
- Debug::log(LOG, "Tablet tool at {:x} removed", rc<uintptr_t>(tool.get()));
+ Log::logger->log(Log::DEBUG, "Tablet tool at {:x} removed", rc<uintptr_t>(tool.get()));
std::erase_if(m_tabletTools, [tool](const auto& other) { return other == tool; });
@@ -1423,7 +1424,7 @@ void CInputManager::destroyTabletTool(SP<CTabletTool> tool) {
}
void CInputManager::destroyTabletPad(SP<CTabletPad> pad) {
- Debug::log(LOG, "Tablet pad at {:x} removed", rc<uintptr_t>(pad.get()));
+ Log::logger->log(Log::DEBUG, "Tablet pad at {:x} removed", rc<uintptr_t>(pad.get()));
std::erase_if(m_tabletPads, [pad](const auto& other) { return other == pad; });
@@ -1541,7 +1542,7 @@ void CInputManager::onKeyboardMod(SP<IKeyboard> pKeyboard) {
const auto LAYOUT = pKeyboard->getActiveLayout();
- Debug::log(LOG, "LAYOUT CHANGED TO {} GROUP {}", LAYOUT, MODS.group);
+ Log::logger->log(Log::DEBUG, "LAYOUT CHANGED TO {} GROUP {}", LAYOUT, MODS.group);
g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->m_hlName + "," + LAYOUT});
EMIT_HOOK_EVENT("activeLayout", (std::vector<std::any>{pKeyboard, LAYOUT}));
@@ -1571,7 +1572,7 @@ void CInputManager::refocus(std::optional<Vector2D> overridePos) {
bool CInputManager::refocusLastWindow(PHLMONITOR pMonitor) {
if (!m_exclusiveLSes.empty()) {
- Debug::log(LOG, "CInputManager::refocusLastWindow: ignoring, exclusive LS present.");
+ Log::logger->log(Log::DEBUG, "CInputManager::refocusLastWindow: ignoring, exclusive LS present.");
return false;
}
@@ -1735,7 +1736,7 @@ void CInputManager::newTouchDevice(SP<Aquamarine::ITouch> pDevice) {
try {
PNEWDEV->m_hlName = getNameForNewDevice(PNEWDEV->m_deviceName);
} catch (std::exception& e) {
- Debug::log(ERR, "Touch Device had no name???"); // logic error
+ Log::logger->log(Log::ERR, "Touch Device had no name???"); // logic error
}
setTouchDeviceConfigs(PNEWDEV);
@@ -1750,7 +1751,7 @@ void CInputManager::newTouchDevice(SP<Aquamarine::ITouch> pDevice) {
destroyTouchDevice(PDEV);
});
- Debug::log(LOG, "New touch device added at {:x}", rc<uintptr_t>(PNEWDEV.get()));
+ Log::logger->log(Log::DEBUG, "New touch device added at {:x}", rc<uintptr_t>(PNEWDEV.get()));
}
void CInputManager::setTouchDeviceConfigs(SP<ITouch> dev) {
@@ -1764,7 +1765,7 @@ void CInputManager::setTouchDeviceConfigs(SP<ITouch> dev) {
libinput_device_config_send_events_set_mode(LIBINPUTDEV, mode);
if (libinput_device_config_calibration_has_matrix(LIBINPUTDEV)) {
- Debug::log(LOG, "Setting calibration matrix for device {}", PTOUCHDEV->m_hlName);
+ Log::logger->log(Log::DEBUG, "Setting calibration matrix for device {}", PTOUCHDEV->m_hlName);
// default value of transform being -1 means it's unset.
const int ROTATION = std::clamp(g_pConfigManager->getDeviceInt(PTOUCHDEV->m_hlName, "transform", "input:touchdevice:transform"), -1, 7);
if (ROTATION > -1)
@@ -1785,10 +1786,10 @@ void CInputManager::setTouchDeviceConfigs(SP<ITouch> dev) {
PTOUCHDEV->m_boundOutput = bound ? output : "";
const auto PMONITOR = bound ? g_pCompositor->getMonitorFromName(output) : nullptr;
if (PMONITOR) {
- Debug::log(LOG, "Binding touch device {} to output {}", PTOUCHDEV->m_hlName, PMONITOR->m_name);
+ Log::logger->log(Log::DEBUG, "Binding touch device {} to output {}", PTOUCHDEV->m_hlName, PMONITOR->m_name);
// wlr_cursor_map_input_to_output(g_pCompositor->m_sWLRCursor, &PTOUCHDEV->wlr()->base, PMONITOR->output);
} else if (bound)
- Debug::log(ERR, "Failed to bind touch device {} to output '{}': monitor not found", PTOUCHDEV->m_hlName, output);
+ Log::logger->log(Log::ERR, "Failed to bind touch device {} to output '{}': monitor not found", PTOUCHDEV->m_hlName, output);
}
};
@@ -1812,7 +1813,7 @@ void CInputManager::setTabletConfigs() {
t->m_relativeInput = RELINPUT;
const int ROTATION = std::clamp(g_pConfigManager->getDeviceInt(NAME, "transform", "input:tablet:transform"), -1, 7);
- Debug::log(LOG, "Setting calibration matrix for device {}", NAME);
+ Log::logger->log(Log::DEBUG, "Setting calibration matrix for device {}", NAME);
if (ROTATION > -1)
libinput_device_config_calibration_set_matrix(LIBINPUTDEV, MATRICES[ROTATION]);
@@ -1823,7 +1824,7 @@ void CInputManager::setTabletConfigs() {
const auto OUTPUT = g_pConfigManager->getDeviceString(NAME, "output", "input:tablet:output");
if (OUTPUT != STRVAL_EMPTY) {
- Debug::log(LOG, "Binding tablet {} to output {}", NAME, OUTPUT);
+ Log::logger->log(Log::DEBUG, "Binding tablet {} to output {}", NAME, OUTPUT);
t->m_boundOutput = OUTPUT;
} else
t->m_boundOutput = "";
@@ -1854,22 +1855,22 @@ void CInputManager::newSwitch(SP<Aquamarine::ISwitch> pDevice) {
const auto PNEWDEV = &m_switches.emplace_back();
PNEWDEV->pDevice = pDevice;
- Debug::log(LOG, "New switch with name \"{}\" added", pDevice->getName());
+ Log::logger->log(Log::DEBUG, "New switch with name \"{}\" added", pDevice->getName());
PNEWDEV->listeners.destroy = pDevice->events.destroy.listen([this, PNEWDEV] { destroySwitch(PNEWDEV); });
PNEWDEV->listeners.fire = pDevice->events.fire.listen([PNEWDEV](const Aquamarine::ISwitch::SFireEvent& event) {
const auto NAME = PNEWDEV->pDevice->getName();
- Debug::log(LOG, "Switch {} fired, triggering binds.", NAME);
+ Log::logger->log(Log::DEBUG, "Switch {} fired, triggering binds.", NAME);
g_pKeybindManager->onSwitchEvent(NAME);
if (event.enable) {
- Debug::log(LOG, "Switch {} turn on, triggering binds.", NAME);
+ Log::logger->log(Log::DEBUG, "Switch {} turn on, triggering binds.", NAME);
g_pKeybindManager->onSwitchOnEvent(NAME);
} else {
- Debug::log(LOG, "Switch {} turn off, triggering binds.", NAME);
+ Log::logger->log(Log::DEBUG, "Switch {} turn off, triggering binds.", NAME);
g_pKeybindManager->onSwitchOffEvent(NAME);
}
});