From a11868102b48c0d12639d0ae2e37fff625d83308 Mon Sep 17 00:00:00 2001 From: gewlitys Date: Sun, 20 Apr 2003 20:28:17 +0000 Subject: [PATCH] Fix issue with num lock and caps lock preventing planet scan and lander message skipping, from chmmravatar git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@916 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 2 ++ sc2/src/sc2code/libs/input/sdl/input.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index a75996507..a8a29ea67 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,6 @@ Changes towards version 0.3: +- Fix issue with caps lock and num lock preventing planet scan + and lander message skipping (bug #299), from chmmravatar - Subtitles are now hidden after alien has finished talking (bug #312), from chmmravatar - Fix for mycon portrait (bug #183), from Nic diff --git a/sc2/src/sc2code/libs/input/sdl/input.c b/sc2/src/sc2code/libs/input/sdl/input.c index 52f71a2b3..7108ce9d4 100644 --- a/sc2/src/sc2code/libs/input/sdl/input.c +++ b/sc2/src/sc2code/libs/input/sdl/input.c @@ -114,6 +114,10 @@ ProcessKeyboardEvent(const SDL_Event *Event) UNICODE map_key; if (!InputInitialized) return; + if (!Event->key.keysym.unicode && + (k == SDLK_CAPSLOCK || + k == SDLK_NUMLOCK)) + return; if (Event->type == SDL_KEYDOWN) {