fixed bug with leaving scores screen on Android platform
authorHolger Schemel <info@artsoft.org>
Sun, 8 May 2022 21:40:37 +0000 (23:40 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 8 May 2022 21:41:16 +0000 (23:41 +0200)
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

index 67dd30880ccb84fdb31471374f275b48d3c457b1..6378dbb469e0cad970a5f391c06729e16122e0cb 100644 (file)
@@ -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();