(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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user