mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
Simply more civilised.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@312 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
42bd1d20de
commit
4c2236c015
1 changed files with 12 additions and 7 deletions
|
@ -94,6 +94,7 @@ int *debug;
|
|||
HHOOK llkeyboardhook;
|
||||
|
||||
cvar_t sys_disableWinKeys = {"sys_disableWinKeys", "0"};
|
||||
cvar_t sys_disableTaskSwitch = {"sys_disableTaskSwitch", "0", NULL, CVAR_NOTFROMSERVER}; // please don't encourage people to use this...
|
||||
|
||||
LRESULT CALLBACK LowLevelKeyboardProc (INT nCode, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -124,14 +125,17 @@ LRESULT CALLBACK LowLevelKeyboardProc (INT nCode, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
// Disable CTRL+ESC
|
||||
//this works, but we've got to give some way to tab out...
|
||||
// if (pkbhs->vkCode == VK_ESCAPE && GetAsyncKeyState (VK_CONTROL) >> ((sizeof(SHORT) * 8) - 1))
|
||||
// return 1;
|
||||
if (sys_disableTaskSwitch.value)
|
||||
{
|
||||
if (pkbhs->vkCode == VK_ESCAPE && GetAsyncKeyState (VK_CONTROL) >> ((sizeof(SHORT) * 8) - 1))
|
||||
return 1;
|
||||
// Disable ATL+TAB
|
||||
if (pkbhs->vkCode == VK_TAB && pkbhs->flags & LLKHF_ALTDOWN)
|
||||
return 1;
|
||||
// Disable ALT+ESC
|
||||
if (pkbhs->vkCode == VK_ESCAPE && pkbhs->flags & LLKHF_ALTDOWN)
|
||||
return 1;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -958,6 +962,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
|
|||
Host_Init (&parms);
|
||||
|
||||
Cvar_Register(&sys_disableWinKeys, "System vars");
|
||||
Cvar_Register(&sys_disableTaskSwitch, "System vars");
|
||||
|
||||
oldtime = Sys_DoubleTime ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue