added support for background image for loading screen
[rocksndiamonds.git] / src / screens.c
index c036c5a2531b2c7db1cef126d03da8685488710f..8b70372f58931af42d77a303e8f2a071502b6fed 100644 (file)
@@ -1688,8 +1688,6 @@ void DrawMainMenu(void)
   // store valid level series information
   leveldir_last_valid = leveldir_current;
 
-  init_last = init;                    // switch to new busy animation
-
   // needed if last screen (level choice) changed graphics, sounds or music
   ReloadCustomArtwork(0);
 
@@ -5114,8 +5112,13 @@ static void drawChooseTreeScreen_Scores_NotAvailable(void)
 
 static TreeInfo *setHallOfFameActiveEntry(TreeInfo **ti_ptr)
 {
+  int score_pos = scores.last_added;
+
+  if (game_status_last_screen == GAME_MODE_SCOREINFO)
+    score_pos = scores.last_entry_nr;
+
   // set current tree entry to last added score entry
-  *ti_ptr = getTreeInfoFromIdentifier(score_entries, i_to_a(scores.last_added));
+  *ti_ptr = getTreeInfoFromIdentifier(score_entries, i_to_a(score_pos));
 
   // if that fails, set current tree entry to first entry (back link)
   if (*ti_ptr == NULL)