adjusted title screen handling, fixing screen border redraw bug on start
authorHolger Schemel <info@artsoft.org>
Tue, 8 Mar 2016 11:58:17 +0000 (12:58 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 8 Mar 2016 11:58:17 +0000 (12:58 +0100)
src/screens.c

index 551b2a6b5e7ab1aefd0f81a2058beeafb28ada47..7181f75029922116de9eb5cfa60d19b3f8b0404c 100644 (file)
@@ -1420,6 +1420,17 @@ void DrawMainMenu()
   /* needed if last screen (level choice) changed graphics, sounds or music */
   ReloadCustomArtwork(0);
 
+  if (CheckTitleScreen(levelset_has_changed))
+  {
+    game_status_last_screen = GAME_MODE_MAIN;
+
+    SetGameStatus(GAME_MODE_TITLE);
+
+    DrawTitleScreen();
+
+    return;
+  }
+
   /* needed if different viewport properties defined for menues */
   ChangeViewportPropertiesIfNeeded();
 
@@ -1436,17 +1447,6 @@ void DrawMainMenu()
 
   SetDrawtoField(DRAW_BACKBUFFER);
 
-  if (CheckTitleScreen(levelset_has_changed))
-  {
-    game_status_last_screen = GAME_MODE_MAIN;
-
-    SetGameStatus(GAME_MODE_TITLE);
-
-    DrawTitleScreen();
-
-    return;
-  }
-
   /* 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;