Removed hook creating from constructor (#4572)

This commit is contained in:
Yevhenii Holovachov 2020-06-29 18:19:43 +03:00 committed by GitHub
parent 1181ab67ba
commit f46b876fd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 14 deletions

View File

@ -10,13 +10,6 @@ std::function<void()> SecondaryMouseButtonsHook::callback = {};
SecondaryMouseButtonsHook::SecondaryMouseButtonsHook(std::function<void()> extCallback)
{
callback = std::move(extCallback);
#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED)
if (IsDebuggerPresent())
{
return;
}
#endif
hHook = SetWindowsHookEx(WH_MOUSE_LL, SecondaryMouseButtonsProc, GetModuleHandle(NULL), 0);
}
void SecondaryMouseButtonsHook::enable()

View File

@ -11,13 +11,6 @@ std::function<void(bool)> ShiftKeyHook::callback = {};
ShiftKeyHook::ShiftKeyHook(std::function<void(bool)> extCallback)
{
callback = std::move(extCallback);
#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED)
if (IsDebuggerPresent())
{
return;
}
#endif
hHook = SetWindowsHookEx(WH_KEYBOARD_LL, ShiftKeyHookProc, GetModuleHandle(NULL), 0);
}
void ShiftKeyHook::enable()