mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
fixup! forgot to rename
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
InitializeWinhookEventIds();
|
||||
Trace::FancyZones::EnableFancyZones(true);
|
||||
m_app = MakeFancyZones(reinterpret_cast<HINSTANCE>(&__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;
|
||||
|
||||
@@ -10,7 +10,7 @@ std::function<void()> SecondaryMouseButtonsHook::callback = {};
|
||||
SecondaryMouseButtonsHook::SecondaryMouseButtonsHook(std::function<void()> 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<void()> extCa
|
||||
|
||||
void SecondaryMouseButtonsHook::enable()
|
||||
{
|
||||
#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED)
|
||||
#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED)
|
||||
if (IsDebuggerPresent())
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -11,7 +11,7 @@ std::function<void(bool)> ShiftKeyHook::callback = {};
|
||||
ShiftKeyHook::ShiftKeyHook(std::function<void(bool)> 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<void(bool)> extCallback)
|
||||
|
||||
void ShiftKeyHook::enable()
|
||||
{
|
||||
#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED)
|
||||
#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED)
|
||||
if (IsDebuggerPresent())
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -135,7 +135,7 @@ void OverlayWindow::enable()
|
||||
winkey_popup->set_theme(theme.value);
|
||||
target_state = std::make_unique<TargetState>(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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user