aboutsummaryrefslogtreecommitdiff
path: root/backends/events
diff options
context:
space:
mode:
authorMatthew Hoops2011-09-30 23:47:36 -0400
committerMatthew Hoops2011-09-30 23:47:36 -0400
commit622e8d9da60d06894f979ddafbcd568710098ac3 (patch)
treea22e96de62cb93eaa7c36b948a8cba7655a858bc /backends/events
parent2883ebc40e3c13488685b21f4f9c37f9cb66059a (diff)
downloadscummvm-rg350-622e8d9da60d06894f979ddafbcd568710098ac3.tar.gz
scummvm-rg350-622e8d9da60d06894f979ddafbcd568710098ac3.tar.bz2
scummvm-rg350-622e8d9da60d06894f979ddafbcd568710098ac3.zip
BACKENDS: Set alt+f4 to be used for quitting on Windows
Diffstat (limited to 'backends/events')
-rw-r--r--backends/events/sdl/sdl-events.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index 9d235e9044..b1e2667e7f 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -436,6 +436,14 @@ bool SdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_QUIT;
return true;
}
+
+ #ifdef WIN32
+ // On Windows, also use the default Alt-F4 quit combination
+ if ((ev.key.keysym.mod & KMOD_ALT) && ev.key.keysym.sym == SDLK_F4) {
+ event.type = Common::EVENT_QUIT;
+ return true;
+ }
+ #endif
#endif
// Ctrl-u toggles mute