(svn r3027) -Feature: [OSX] command+q now works in main menu (Tobin)
authorbjarni
Fri, 07 Oct 2005 20:53:21 +0000
changeset 2501 8d13d08b9232
parent 2500 92bc404b86ca
child 2502 a77b8b2f173c
(svn r3027) -Feature: [OSX] command+q now works in main menu (Tobin)
main_gui.c
--- a/main_gui.c	Fri Oct 07 16:48:53 2005 +0000
+++ b/main_gui.c	Fri Oct 07 20:53:21 2005 +0000
@@ -2349,6 +2349,13 @@
 			e->keypress.cont = false;
 			break;
 		}
+		
+		// check to see if Command-Q has been pressed on a Mac
+		// must be done before checking if we are at the main menu
+		if ( (e->keypress.keycode == ('Q' | WKC_CTRL)) || (e->keypress.keycode == ('Q' | WKC_META)) )
+		{
+			AskExitGame();
+		}
 
 		if (_game_mode == GM_MENU) break;
 
@@ -2366,7 +2373,6 @@
 		case WKC_ESC: ResetObjectToPlace(); break;
 		case WKC_DELETE: DeleteNonVitalWindows(); break;
 		case WKC_DELETE | WKC_SHIFT: DeleteAllNonVitalWindows(); break;
-		case 'Q' | WKC_CTRL: case 'Q' | WKC_META: AskExitGame(); break; // this enables command + Q on mac
 		case 'R' | WKC_CTRL: MarkWholeScreenDirty(); break;
 #if defined(_DEBUG)
 		case '0' | WKC_ALT: /* Crash the game */