fixed several problems when displaying info sub-screens from main menu
authorHolger Schemel <info@artsoft.org>
Wed, 14 Dec 2022 10:43:55 +0000 (11:43 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 14 Dec 2022 10:44:45 +0000 (11:44 +0100)
src/screens.c

index 05b5fb67aef066db9bfcbddcc85c4960fdb32cd0..021dfcdc3fc046691115548736f33eff5a07d4d8 100644 (file)
@@ -3865,6 +3865,8 @@ static void DrawInfoScreen(void)
 
 void DrawInfoScreen_FromMainMenu(int nr)
 {
+  int fade_mask = REDRAW_FIELD;
+
   if (nr < INFO_MODE_MAIN || nr >= MAX_INFO_MODES)
     return;
 
@@ -3875,8 +3877,26 @@ void DrawInfoScreen_FromMainMenu(int nr)
   info_mode = nr;
   info_screens_from_main = TRUE;
 
+  if (redraw_mask & REDRAW_ALL)
+    fade_mask = REDRAW_ALL;
+
+  if (CheckFadeAll())
+    fade_mask = REDRAW_ALL;
+
+  UnmapAllGadgets();
+  FadeMenuSoundsAndMusic();
+
   FadeSetEnterScreen();
 
+  FadeOut(fade_mask);
+
+  FadeSkipNextFadeOut();
+
+  // needed if different viewport properties defined for info screen
+  ChangeViewportPropertiesIfNeeded();
+
+  SetMainBackgroundImage(IMG_BACKGROUND_INFO);
+
   DrawInfoScreen();
 }