From 5d346cad6a50bbd83d84721caae9235dff8132f0 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 8 Nov 2009 01:29:19 -0500 Subject: [PATCH] Allow Mac OS X builds to quit with Apple-Q hotkey. --- Source/OpenGL_Windows.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) -- 2.39.2