changed loading level before checking for title screens
authorHolger Schemel <info@artsoft.org>
Sat, 16 Mar 2024 11:57:42 +0000 (12:57 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 16 Mar 2024 11:57:42 +0000 (12:57 +0100)
src/screens.c

index f623a7a551c41ab14bc3e0799f5511d35e1de7cc..aadbe74dcaf486c587c8fe59496d0f4b547695a5 100644 (file)
@@ -1785,6 +1785,15 @@ void DrawMainMenu(void)
   // store first level of this level set for "level_nr" style animations
   SetAnimationFirstLevel(leveldir_current->first_level);
 
+  // level_nr may have been set to value over handicap with level editor
+  if (setup.handicap && level_nr > leveldir_current->handicap_level)
+    level_nr = leveldir_current->handicap_level;
+
+  LoadLevel(level_nr);
+  LoadScore(level_nr);
+
+  SaveLevelSetup_SeriesInfo();
+
   // needed if last screen (level choice) changed graphics, sounds or music
   ReloadCustomArtwork(0);
 
@@ -1810,15 +1819,6 @@ void DrawMainMenu(void)
 
   SetDrawtoField(DRAW_TO_BACKBUFFER);
 
-  // level_nr may have been set to value over handicap with level editor
-  if (setup.handicap && level_nr > leveldir_current->handicap_level)
-    level_nr = leveldir_current->handicap_level;
-
-  LoadLevel(level_nr);
-  LoadScore(level_nr);
-
-  SaveLevelSetup_SeriesInfo();
-
   // set this after "ChangeViewportPropertiesIfNeeded()" (which may reset it)
   SetDrawDeactivationMask(REDRAW_NONE);
   SetDrawBackgroundMask(REDRAW_FIELD);