From: Ryan C. Gordon Date: Sun, 8 Nov 2009 06:29:19 +0000 (-0500) Subject: Allow Mac OS X builds to quit with Apple-Q hotkey. X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=5d346cad6a50bbd83d84721caae9235dff8132f0;p=lugaru.git Allow Mac OS X builds to quit with Apple-Q hotkey. --- diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index a64f5e4..2efaac4 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -504,6 +504,16 @@ static void sdlEventProc(const SDL_Event &e, Game &game) } } + #if (defined(__APPLE__) && defined(__MACH__)) + if (e.key.keysym.sym == SDLK_q) + { + if (e.key.keysym.mod & KMOD_META) + { + gDone=true; + } + } + #endif + else if (e.key.keysym.sym == SDLK_RETURN) { if (e.key.keysym.mod & KMOD_ALT)