diff options
author | dominik <dominik@openttd.org> | 2004-09-19 18:23:11 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2004-09-19 18:23:11 +0000 |
commit | a38e2d046acfb02da4c99b7b9db292c2e0007ab3 (patch) | |
tree | 2cf3ae5b4ab3b1c6a77c22100f0275f3238e1bac | |
parent | 6cad1071c803b3c53727edc80d2bc18b26313ae0 (diff) | |
download | openttd-a38e2d046acfb02da4c99b7b9db292c2e0007ab3.tar.xz |
(svn r297) Fix (SDL): Added a confirmation dialog when quitting the game
-rw-r--r-- | sdl.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -468,7 +468,12 @@ static int PollEvent() { break; case SDL_QUIT: - return ML_QUIT; + // do not ask to quit on the main screen + if(_game_mode != GM_MENU) + AskExitGame(); + else + return ML_QUIT; + break; case SDL_KEYDOWN: if ((((ev.key.keysym.sym == SDLK_RETURN) || (ev.key.keysym.sym == SDLK_f)) && (ev.key.keysym.mod & KMOD_ALT)) || (((ev.key.keysym.sym == SDLK_RETURN) || (ev.key.keysym.sym == SDLK_f)) && (ev.key.keysym.mod & KMOD_META))) { |