fixed handling "Escape" key on high score screen
authorHolger Schemel <info@artsoft.org>
Sat, 20 Apr 2019 08:55:13 +0000 (10:55 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 20 Apr 2019 08:55:13 +0000 (10:55 +0200)
Before, pressing the "Escape" key on the high score screen after
solving a level when using the game setting "auto-play next level"
started playing the next level.

Now, only "positive" input actions (like pressing "Space" or "Enter"
or pressing a joystick button) start playing the next level, while a
"negative" input action like pressing the "Escape" key always returns
to the main menu even with this game setting activated.

src/screens.c

index 66cc27a..dd7f2b4 100644 (file)
@@ -4705,7 +4705,8 @@ void HandleHallOfFame(int mx, int my, int dx, int dy, int button)
 
     FadeSound(SND_BACKGROUND_SCORES);
 
-    if (game_status_last_screen == GAME_MODE_PLAYING &&
+    if (button == MB_MENU_CHOICE &&
+       game_status_last_screen == GAME_MODE_PLAYING &&
        setup.auto_play_next_level && setup.increment_levels &&
        level_nr < leveldir_current->last_level &&
        !network_playing)