From a38e2d046acfb02da4c99b7b9db292c2e0007ab3 Mon Sep 17 00:00:00 2001 From: dominik Date: Sun, 19 Sep 2004 18:23:11 +0000 Subject: [PATCH] (svn r297) Fix (SDL): Added a confirmation dialog when quitting the game --- sdl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sdl.c b/sdl.c index 7f04e26ab3..a25725cbbf 100644 --- a/sdl.c +++ b/sdl.c @@ -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))) {