From: Holger Schemel Date: Sun, 8 May 2022 21:40:37 +0000 (+0200) Subject: fixed bug with leaving scores screen on Android platform X-Git-Tag: 4.3.2.2~40 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a42f3002eab95f9abd9797ed43dbf271ecd53033;p=rocksndiamonds.git 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). --- 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();