From 622e8d9da60d06894f979ddafbcd568710098ac3 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 30 Sep 2011 23:47:36 -0400 Subject: BACKENDS: Set alt+f4 to be used for quitting on Windows --- backends/events/sdl/sdl-events.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'backends/events') 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 -- cgit v1.2.3