From 598ebb81c5f671c28d60db545020b4a34376d814 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 2 Nov 2011 23:36:12 +0000 Subject: [PATCH] attempt to see if this fixes an SDL bug in windows described here: http://lists.libsdl.org/pipermail/sdl-libsdl.org/2005-February/048841.html) --- source/shared_lib/sources/platform/sdl/window.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/shared_lib/sources/platform/sdl/window.cpp b/source/shared_lib/sources/platform/sdl/window.cpp index 46c33879..2b8623bd 100644 --- a/source/shared_lib/sources/platform/sdl/window.cpp +++ b/source/shared_lib/sources/platform/sdl/window.cpp @@ -185,6 +185,9 @@ bool Window::handleEvent() { codeLocation = "i"; Window::isKeyPressedDown = true; +#ifdef WIN32 + event.key.keysym.mod = SDL_GetModState(); +#endif keystate = event.key.keysym; string keyName = SDL_GetKeyName(event.key.keysym.sym); @@ -228,6 +231,10 @@ bool Window::handleEvent() { codeLocation = "j"; Window::isKeyPressedDown = false; +#ifdef WIN32 + event.key.keysym.mod = SDL_GetModState(); +#endif + keystate = event.key.keysym; if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] KEY_UP, Raw SDL key [%d] mod [%d] unicode [%d] scancode [%d]\n",__FILE__,__FUNCTION__,__LINE__,event.key.keysym.sym,event.key.keysym.mod,event.key.keysym.unicode,event.key.keysym.scancode);