From a42f3002eab95f9abd9797ed43dbf271ecd53033 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 8 May 2022 23:40:37 +0200 Subject: [PATCH] fixed bug with leaving scores screen on Android platform This change fixes a problem that occurs on the scores screen after playing a game on Android, where the screen is left by any user input, but then does not reset the flag that the last screen was the playing screen, causing all other "choose tree" style screens to also exit on any user input (which makes it impossible to select a different level set on the level set selection screen afterwards, for example). --- src/screens.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/screens.c b/src/screens.c index 67dd3088..6378dbb4 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4338,6 +4338,9 @@ static void DrawChooseTree(TreeInfo **ti_ptr) boolean restart_music = (game_status != game_status_last_screen && game_status_last_screen != GAME_MODE_SCOREINFO); + scores.was_just_playing = (game_status == GAME_MODE_SCORES && + game_status_last_screen == GAME_MODE_PLAYING); + if (CheckFadeAll()) fade_mask = REDRAW_ALL; @@ -5294,7 +5297,6 @@ static void DrawHallOfFame_setScoreEntries(void) void DrawHallOfFame(int level_nr) { scores.last_level_nr = level_nr; - scores.was_just_playing = (game_status_last_screen == GAME_MODE_PLAYING); // (this is needed when called from GameEnd() after winning a game) KeyboardAutoRepeatOn(); -- 2.34.1