Win32 - prevent "hotkey" explosion by rshift on some laptop keyboards.

This commit is contained in:
adelikat 2009-03-23 00:54:47 +00:00
parent 555d62edc8
commit f5e4082ece
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
---version 2.0.4 yet to be released---
23-mar-2009 - adelikat - Win32 - blocked "hotkey explosion" by rshift on some laptops
22-mar-2009 - shinydoofy - sdl - added hotkey I and --inputdisplay {0|1|2|4} for toggling input display.
22-mar-2009 - shinydoofy - sdl - added commandline options for sound channels' volumes
22-mar-2009 - shinydoofy - sdl - updated window title

View File

@ -45,7 +45,7 @@ void KeyboardUpdateState(void)
unsigned char tk[256];
ddrval=IDirectInputDevice7_GetDeviceState(lpdid,256,tk);
if (tk[0]) tk[0] = 0; //adelikat: HACK. If a keyboard key is recognized as this, the effect is that all non assigned hotkeys are run. This prevents the key from being used, but also prevent "hotkey explosion". Also, they essentially couldn't use it anyway since FCEUX doesn't know it is a shift key, and it can't be assigned in the hotkeys
// HACK because DirectInput is totally wacky about recognizing the PAUSE/BREAK key
if(GetAsyncKeyState(VK_PAUSE)) // normally this should have & 0x8000, but apparently this key is too special for that to work
tk[0xC5] = 0x80;