Ticket #9153: bug_2978736.patch
File bug_2978736.patch, 1.9 KB (added by , 15 years ago) |
---|
-
backends/platform/sdl/events.cpp
340 340 event.kbd.flags |= Common::KBD_SCRL; 341 341 342 342 if ((event.kbd.flags & (Common::KBD_CTRL|Common::KBD_ALT)) == (Common::KBD_CTRL|Common::KBD_ALT)) { 343 // Swallow these key up events 344 return false; 343 if (isScalerHotkey(ev.key)) 344 // Swallow these key up events 345 return false; 345 346 } 346 347 347 348 return true; -
backends/platform/sdl/graphics.cpp
2002 2002 return false; 2003 2003 } 2004 2004 } 2005 2006 bool OSystem_SDL::isScalerHotkey(const SDL_KeyboardEvent &key) { 2007 const bool isNormalNumber = (SDLK_1 <= key.keysym.sym && key.keysym.sym <= SDLK_9); 2008 const bool isKeypadNumber = (SDLK_KP1 <= key.keysym.sym && key.keysym.sym <= SDLK_KP9); 2009 const bool isScaleKey = (key.keysym.sym == SDLK_EQUALS || key.keysym.sym == SDLK_PLUS || key.keysym.sym == SDLK_MINUS || 2010 key.keysym.sym == SDLK_KP_PLUS || key.keysym.sym == SDLK_KP_MINUS); 2011 if (isNormalNumber || isKeypadNumber) { 2012 int keyValue = key.keysym.sym - (isNormalNumber ? SDLK_1 : SDLK_KP1); 2013 if (keyValue >= ARRAYSIZE(s_gfxModeSwitchTable)) 2014 return false; 2015 } 2016 return (isScaleKey || key.keysym.sym == 'a'); 2017 } -
backends/platform/sdl/sdl.h
490 490 virtual bool remapKey(SDL_Event &ev, Common::Event &event); 491 491 492 492 bool handleScalerHotkeys(const SDL_KeyboardEvent &key); 493 bool isScalerHotkey(const SDL_KeyboardEvent &key); 493 494 }; 494 495 495 496 #endif