(svn r297) Fix (SDL): Added a confirmation dialog when quitting the game
authordominik
Sun, 19 Sep 2004 18:23:11 +0000
changeset 291 8339f2fe911d
parent 290 02c553babb65
child 292 9b0a6d544593
(svn r297) Fix (SDL): Added a confirmation dialog when quitting the game
sdl.c
--- a/sdl.c	Sun Sep 19 16:55:09 2004 +0000
+++ b/sdl.c	Sun Sep 19 18:23:11 2004 +0000
@@ -468,7 +468,12 @@
 		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))) {