summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-12-14 00:45:24 +0000
committerdarkvater <darkvater@openttd.org>2004-12-14 00:45:24 +0000
commit0495bbdca1583a5ec668f2d91d99ccf159165797 (patch)
tree1ece6d701846d90464cde4c864f4019c3b3d0e1b
parente022088b690dc8e1e3dd4211002de8ed13ea0de6 (diff)
downloadopenttd-0495bbdca1583a5ec668f2d91d99ccf159165797.tar.xz
(svn r1079) -Fix: you can once again quit the game in windows by pressing ALT+F4 or the 'exit' button in the main menu.
-rw-r--r--win32.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/win32.c b/win32.c
index 0cbb38b5a..2f82559a0 100644
--- a/win32.c
+++ b/win32.c
@@ -226,15 +226,14 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
}
case WM_CLOSE:
- // do not ask to quit on the main screen
- if (_game_mode != GM_MENU) {
- if(_patches.autosave_on_exit) {
+ if (_game_mode == GM_MENU) { // do not ask to quit on the main screen
+ _exit_game = true;
+ } else if (_patches.autosave_on_exit) {
DoExitSave();
_exit_game = true;
- } else
- AskExitGame();
} else
- return ML_QUIT;
+ AskExitGame();
+
return 0;
case WM_LBUTTONDOWN: