diff --git a/src/common/debug_control.h b/src/common/debug_control.h index 0f7995b67..8a48d5961 100644 --- a/src/common/debug_control.h +++ b/src/common/debug_control.h @@ -1,4 +1,4 @@ #pragma once // Prevent system-wide input lagging while paused in the debugger -//#define DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED +//#define DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED diff --git a/src/common/interop/KeyboardHook.cpp b/src/common/interop/KeyboardHook.cpp index b5d3f8c20..5fc910660 100644 --- a/src/common/interop/KeyboardHook.cpp +++ b/src/common/interop/KeyboardHook.cpp @@ -61,7 +61,7 @@ void KeyboardHook::Start() hookProc = gcnew HookProcDelegate(this, &KeyboardHook::HookProc); Process ^ curProcess = Process::GetCurrentProcess(); ProcessModule ^ curModule = curProcess->MainModule; -#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED) +#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED) const bool hookDisabled = IsDebuggerPresent(); #else const bool hookDisabled = false; diff --git a/src/modules/fancyzones/dll/dllmain.cpp b/src/modules/fancyzones/dll/dllmain.cpp index 3eec6ec8c..8bc20f43b 100644 --- a/src/modules/fancyzones/dll/dllmain.cpp +++ b/src/modules/fancyzones/dll/dllmain.cpp @@ -79,7 +79,7 @@ public: InitializeWinhookEventIds(); Trace::FancyZones::EnableFancyZones(true); m_app = MakeFancyZones(reinterpret_cast(&__ImageBase), m_settings); -#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED) +#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED) const bool hook_disabled = IsDebuggerPresent(); #else const bool hook_disabled = false; diff --git a/src/modules/fancyzones/lib/SecondaryMouseButtonsHook.cpp b/src/modules/fancyzones/lib/SecondaryMouseButtonsHook.cpp index a19c85e4c..ad36dffb6 100644 --- a/src/modules/fancyzones/lib/SecondaryMouseButtonsHook.cpp +++ b/src/modules/fancyzones/lib/SecondaryMouseButtonsHook.cpp @@ -10,7 +10,7 @@ std::function SecondaryMouseButtonsHook::callback = {}; SecondaryMouseButtonsHook::SecondaryMouseButtonsHook(std::function extCallback) { callback = std::move(extCallback); -#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED) +#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED) if (IsDebuggerPresent()) { return; @@ -21,7 +21,7 @@ SecondaryMouseButtonsHook::SecondaryMouseButtonsHook(std::function extCa void SecondaryMouseButtonsHook::enable() { -#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED) +#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED) if (IsDebuggerPresent()) { return; diff --git a/src/modules/fancyzones/lib/ShiftKeyHook.cpp b/src/modules/fancyzones/lib/ShiftKeyHook.cpp index 0b1d470e2..c9ff05fe4 100644 --- a/src/modules/fancyzones/lib/ShiftKeyHook.cpp +++ b/src/modules/fancyzones/lib/ShiftKeyHook.cpp @@ -11,7 +11,7 @@ std::function ShiftKeyHook::callback = {}; ShiftKeyHook::ShiftKeyHook(std::function extCallback) { callback = std::move(extCallback); -#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED) +#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED) if (IsDebuggerPresent()) { return; @@ -22,7 +22,7 @@ ShiftKeyHook::ShiftKeyHook(std::function extCallback) void ShiftKeyHook::enable() { -#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED) +#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED) if (IsDebuggerPresent()) { return; diff --git a/src/modules/keyboardmanager/dll/dllmain.cpp b/src/modules/keyboardmanager/dll/dllmain.cpp index 1bdfd1069..37573473d 100644 --- a/src/modules/keyboardmanager/dll/dllmain.cpp +++ b/src/modules/keyboardmanager/dll/dllmain.cpp @@ -301,7 +301,7 @@ public: void start_lowlevel_keyboard_hook() { -#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED) +#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED) if (IsDebuggerPresent()) { return; diff --git a/src/modules/shortcut_guide/shortcut_guide.cpp b/src/modules/shortcut_guide/shortcut_guide.cpp index eaea8cc1b..fff6658c0 100644 --- a/src/modules/shortcut_guide/shortcut_guide.cpp +++ b/src/modules/shortcut_guide/shortcut_guide.cpp @@ -135,7 +135,7 @@ void OverlayWindow::enable() winkey_popup->set_theme(theme.value); target_state = std::make_unique(pressTime.value); winkey_popup->initialize(); -#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED) +#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED) const bool hook_disabled = IsDebuggerPresent(); #else const bool hook_disabled = false; diff --git a/src/runner/lowlevel_keyboard_event.cpp b/src/runner/lowlevel_keyboard_event.cpp index e4c5924a7..13a5a6ad9 100644 --- a/src/runner/lowlevel_keyboard_event.cpp +++ b/src/runner/lowlevel_keyboard_event.cpp @@ -25,7 +25,7 @@ namespace void start_lowlevel_keyboard_hook() { -#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED) +#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED) if (IsDebuggerPresent()) { return;