mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r3027) -Feature: [OSX] command+q now works in main menu (Tobin)
This commit is contained in:
parent
7ba69ad146
commit
cafd3528a4
@ -2350,6 +2350,13 @@ static void MainWindowWndProc(Window *w, WindowEvent *e) {
|
|||||||
break;
|
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;
|
if (_game_mode == GM_MENU) break;
|
||||||
|
|
||||||
switch (e->keypress.keycode) {
|
switch (e->keypress.keycode) {
|
||||||
@ -2366,7 +2373,6 @@ static void MainWindowWndProc(Window *w, WindowEvent *e) {
|
|||||||
case WKC_ESC: ResetObjectToPlace(); break;
|
case WKC_ESC: ResetObjectToPlace(); break;
|
||||||
case WKC_DELETE: DeleteNonVitalWindows(); break;
|
case WKC_DELETE: DeleteNonVitalWindows(); break;
|
||||||
case WKC_DELETE | WKC_SHIFT: DeleteAllNonVitalWindows(); 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;
|
case 'R' | WKC_CTRL: MarkWholeScreenDirty(); break;
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
case '0' | WKC_ALT: /* Crash the game */
|
case '0' | WKC_ALT: /* Crash the game */
|
||||||
|
Loading…
Reference in New Issue
Block a user