From 19e6ef2c76b4f5c01c04cf25702601f3ae8e70b5 Mon Sep 17 00:00:00 2001 From: ghaushe Date: Tue, 25 Feb 2003 00:22:26 +0000 Subject: [PATCH] the key state (up/down) now only stores the actual key, without modifiers (i.e. 'f' not 'F') Fixes bug #144 (possibly 187 too?) git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@826 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/input/sdl/input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sc2/src/sc2code/libs/input/sdl/input.c b/sc2/src/sc2code/libs/input/sdl/input.c index 837a9562f..45cb4d14b 100644 --- a/sc2/src/sc2code/libs/input/sdl/input.c +++ b/sc2/src/sc2code/libs/input/sdl/input.c @@ -127,11 +127,13 @@ ProcessKeyboardEvent(const SDL_Event *Event) kbdhead = (kbdhead + 1) & (KBDBUFSIZE - 1); if (map_key == AbortKey) exit(0); - KeyboardDown[UNICODEToKBD (map_key)] |= 0x3; + //Store the actual key (without nay shift/ctrl modifiers) + //since the modifiers can't be retreived on a key-up + KeyboardDown[k] |= 0x3; } else { - KeyboardDown[UNICODEToKBD (KBDToUNICODE (k))] &= (~0x1); + KeyboardDown[k] &= (~0x1); } }