changed function parameter handling (with same functionality)
authorHolger Schemel <info@artsoft.org>
Fri, 19 Feb 2021 01:37:59 +0000 (02:37 +0100)
committerHolger Schemel <info@artsoft.org>
Fri, 19 Feb 2021 01:44:38 +0000 (02:44 +0100)
src/events.c
src/game.c

index e07b8494cef2b9167b45382cb919bf5e69a3189f..fe82932a746867dcfd26d64f01208ecf2e8e0a2f 100644 (file)
@@ -2411,7 +2411,7 @@ void HandleKey(Key key, int key_status)
       switch (key)
       {
         case KSYM_Escape:
-         RequestQuitGame(setup.ask_on_escape);
+         RequestQuitGame(TRUE);
          break;
 
        default:
index 48f5e7f158e13c68da188ade38a79d427057f63b..476b67b049b34db5f50c3f57a4ece155f0b99a72 100644 (file)
@@ -15406,9 +15406,10 @@ void RequestQuitGameExt(boolean skip_request, boolean quick_quit, char *message)
   }
 }
 
-void RequestQuitGame(boolean ask_if_really_quit)
+void RequestQuitGame(boolean escape_key_pressed)
 {
-  boolean quick_quit = (!ask_if_really_quit || level_editor_test_game);
+  boolean quick_quit = ((escape_key_pressed && !setup.ask_on_escape) ||
+                       level_editor_test_game);
   boolean skip_request = game.all_players_gone || quick_quit;
 
   RequestQuitGameExt(skip_request, quick_quit,
@@ -16271,7 +16272,7 @@ static void HandleGameButtonsExt(int id, int button)
       if (tape.playing)
        TapeStop();
       else
-       RequestQuitGame(TRUE);
+       RequestQuitGame(FALSE);
 
       break;