]> git.jsancho.org Git - lugaru.git/commitdiff
Allow Mac OS X builds to quit with Apple-Q hotkey.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 8 Nov 2009 06:29:19 +0000 (01:29 -0500)
committerRyan C. Gordon <icculus@icculus.org>
Sun, 8 Nov 2009 06:29:19 +0000 (01:29 -0500)
Source/OpenGL_Windows.cpp

index a64f5e4408f3bda69737bacc04f7f2834fdfb4b9..2efaac415be6bcf6fdc188de8a408bd63ad35fee 100644 (file)
@@ -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)