summaryrefslogtreecommitdiff
path: root/video/win32_v.c
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-09-04 17:30:30 +0000
committerrubidium <rubidium@openttd.org>2006-09-04 17:30:30 +0000
commita7cfb80c40d9a4c544ece10872fd3808f9f59f8d (patch)
tree6cd5046c6a647012a61f5f97b8c5794446df92c5 /video/win32_v.c
parent56d06ba0a75b7157fdd236327cd08f9b0538551e (diff)
downloadopenttd-a7cfb80c40d9a4c544ece10872fd3808f9f59f8d.tar.xz
(svn r6380) -Codechange: unify all ways to quit OTTD.
This means that in the intro menu the 'Quit' button immediatelly quits and the 'Quit' in the menu of the normal game and scenario editor immediatelly quits when the 'autosave_on_exit' patch is turned on. This is the same way as the OS/window manager initiated quits, like alt-F4 and the 'x' in the (OS/window manager drawn) title bar of OTTD.
Diffstat (limited to 'video/win32_v.c')
-rw-r--r--video/win32_v.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/video/win32_v.c b/video/win32_v.c
index 207683db4..05bc4d7a6 100644
--- a/video/win32_v.c
+++ b/video/win32_v.c
@@ -151,8 +151,6 @@ static void ClientSizeChanged(int w, int h)
}
}
-extern void DoExitSave(void);
-
#ifdef _DEBUG
// Keep this function here..
// It allows you to redraw the screen from within the MSVC debugger
@@ -256,14 +254,7 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
}
case WM_CLOSE:
- 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();
- }
+ HandleExitGameRequest();
_window_maximize = IsZoomed(_wnd.main_wnd);
return 0;