moved re-creating gadgets to main info screen function
authorHolger Schemel <holger.schemel@virtion.de>
Sun, 17 Nov 2024 23:26:47 +0000 (00:26 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Sun, 17 Nov 2024 23:26:47 +0000 (00:26 +0100)
src/screens.c

index 7abfd77bcc06d7e9f138817d6df44ba473f351ab..724573594a8ee8e10d0aeae5ae93e6d8f9a6f9a6 100644 (file)
@@ -4380,9 +4380,6 @@ static void DrawInfoScreen_GenericScreen(int screen_nr, int num_screens, int use
   int font_foot = MENU_INFO_FONT_FOOT;
   int yfooter = MENU_SCREEN_INFO_FOOTER;
 
-  FreeScreenGadgets();
-  CreateScreenGadgets();
-
   ClearField();
 
   DrawInfoScreen_Headline(screen_nr, num_screens, use_global_screens);
@@ -4476,6 +4473,9 @@ static void DrawInfoScreen_Generic(void)
 
   FadeOut(REDRAW_FIELD);
 
+  FreeScreenGadgets();
+  CreateScreenGadgets();
+
   HandleInfoScreen_Generic(0, 0, 0, 0, MB_MENU_INITIALIZE);
 
   PlayInfoSoundsAndMusic();