From: Holger Schemel Date: Fri, 19 Feb 2021 01:37:59 +0000 (+0100) Subject: changed function parameter handling (with same functionality) X-Git-Tag: 4.2.3.0~3 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ab8e032c1d2c7ec3df6b8491bdbd8f8e57c7dc70;p=rocksndiamonds.git changed function parameter handling (with same functionality) --- diff --git a/src/events.c b/src/events.c index e07b8494..fe82932a 100644 --- a/src/events.c +++ b/src/events.c @@ -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: diff --git a/src/game.c b/src/game.c index 48f5e7f1..476b67b0 100644 --- a/src/game.c +++ b/src/game.c @@ -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;