win32: detect esc when using backgroundinput

This commit is contained in:
OV2 2018-04-22 20:06:24 +02:00
parent 513926521d
commit 47144176ff

View File

@ -2829,7 +2829,12 @@ VOID CALLBACK HotkeyTimer( UINT idEvent, UINT uMsg, DWORD dwUser, DWORD dw1, DWO
if(counter%2 && !joyState[i]) if(counter%2 && !joyState[i])
continue; continue;
bool active = !S9xGetState(i); // special case for escape since S9xGetState ignores it
bool active;
if (i == VK_ESCAPE)
active = (GetKeyState(VK_ESCAPE) & 0x80) != 0;
else
active = !S9xGetState(i);
if(active) if(active)
{ {
if(joyState[i] < ULONG_MAX) // 0xffffffffUL if(joyState[i] < ULONG_MAX) // 0xffffffffUL