Only activate the low-level keyboard hook if one of the relevant cvars is enabled.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5471 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2019-06-07 22:19:49 +00:00
parent 40c0eea061
commit 19ac844e90

View file

@ -1076,6 +1076,9 @@ LRESULT CALLBACK LowLevelKeyboardProc (INT nCode, WPARAM wParam, LPARAM lParam)
void SetHookState(qboolean state) void SetHookState(qboolean state)
{ {
if (!sys_disableTaskSwitch.ival && !sys_disableWinKeys.ival)
state = false;
if (!state == !llkeyboardhook) //not so types are comparable if (!state == !llkeyboardhook) //not so types are comparable
return; return;