Runner: improve debugging experience with hooks

This commit is contained in:
yuyoyuppe
2020-06-18 14:27:20 +03:00
parent 7ed03c8b90
commit 2effbd0baf
10 changed files with 83 additions and 25 deletions

View File

@@ -12,6 +12,7 @@
#include <keyboardmanager/common/RemapShortcut.h>
#include <keyboardmanager/common/KeyboardManagerConstants.h>
#include <common/settings_helpers.h>
#include <common/debug_control.h>
#include <keyboardmanager/common/trace.h>
#include "KeyboardEventHandlers.h"
#include "Input.h"
@@ -298,11 +299,9 @@ public:
return CallNextHookEx(hook_handle_copy, nCode, wParam, lParam);
}
// Prevent system-wide input lagging while paused in the debugger
//#define DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED
void start_lowlevel_keyboard_hook()
{
#if defined(_DEBUG) && defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED)
#if defined(DISABLE_LOWLEVEL_KBHOOK_WHEN_DEBUGGED)
if (IsDebuggerPresent())
{
return;