- ALT-F4 auto quits the game in win32

This commit is contained in:
Mark Vejvoda 2011-04-18 22:09:55 +00:00
parent c2eca9bb05
commit 8325463c71
1 changed files with 8 additions and 0 deletions

View File

@ -181,6 +181,14 @@ bool Window::handleEvent() {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d] SDLK_RETURN pressed.\n",__FILE__,__FUNCTION__,__LINE__);
toggleFullscreen();
}
#ifdef WIN32
/* handle ALT+f4 */
if((keyName == "f4" || keyName == "F4")
&& (event.key.keysym.mod & (KMOD_LALT | KMOD_RALT))) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d] ALT-F4 pressed.\n",__FILE__,__FUNCTION__,__LINE__);
return false;
}
#endif
if(global_window) {
char key = getKey(event.key.keysym,true);
key = tolower(key);