summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-10-07 20:53:21 +0000
committerbjarni <bjarni@openttd.org>2005-10-07 20:53:21 +0000
commitcafd3528a47eddae3214aef3c96de619d56a026b (patch)
tree21672a608cbee1b6ec1d39272eb8083a2aa06d8c /main_gui.c
parent7ba69ad146a43275f6c45311bbecaf45acbcba3a (diff)
downloadopenttd-cafd3528a47eddae3214aef3c96de619d56a026b.tar.xz
(svn r3027) -Feature: [OSX] command+q now works in main menu (Tobin)
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main_gui.c b/main_gui.c
index a705f707c..9ccfb5bdd 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -2349,6 +2349,13 @@ static void MainWindowWndProc(Window *w, WindowEvent *e) {
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 @@ static void MainWindowWndProc(Window *w, WindowEvent *e) {
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 */