A thread which sits in the background and checks whether the hook should unload. It will also monitor the keyboard for Alias Isolation disable/enable hotkeys.
| 20 | // unload. It will also monitor the keyboard for Alias Isolation disable/enable |
| 21 | // hotkeys. |
| 22 | DWORD WINAPI terminationWatchThread(void *) |
| 23 | { |
| 24 | while (true) |
| 25 | { |
| 26 | for (int i = 0; i < 5; ++i) |
| 27 | { |
| 28 | if ((GetKeyState(VK_CONTROL) & GetKeyState(VK_INSERT) & 0x80u) != 0u) |
| 29 | { |
| 30 | enableShaderHooks(); |
| 31 | } |
| 32 | else if ((GetKeyState(VK_CONTROL) & GetKeyState(VK_DELETE) & 0x80u) != 0u) |
| 33 | { |
| 34 | disableShaderHooks(); |
| 35 | } |
| 36 | |
| 37 | Sleep(50); |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | LPTOP_LEVEL_EXCEPTION_FILTER WINAPI |
| 43 | SetUnhandledExceptionFilter_hook(LPTOP_LEVEL_EXCEPTION_FILTER /*lpTopLevelExceptionFilter*/) |
nothing calls this directly
no test coverage detected