fixed bugs when drawing global borders when fading screens
authorHolger Schemel <info@artsoft.org>
Tue, 22 Mar 2016 09:24:18 +0000 (10:24 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 22 Mar 2016 09:24:18 +0000 (10:24 +0100)
src/screens.c
src/tools.c

index 1f5d4230dfd5c489e73647ebc709f4f4f6628599..5af8723245945092535ebe445d6be87fd9763555 100644 (file)
@@ -1581,10 +1581,10 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button)
       }
 
       FadeSoundsAndMusic();
-
-      FadeOut(REDRAW_ALL);
     }
 
+    FadeOut(REDRAW_ALL);
+
     /* only required to update logic for redrawing global border */
     ClearField();
 
index 3dcf88af26d04ebdcc2cff721e38734d10bcdc03..a212e6ade9846a182bf796ab05865ab96781ce22 100644 (file)
@@ -305,7 +305,7 @@ static void DrawMaskedBorderExt_Rect(int x, int y, int width, int height,
 
 static void DrawMaskedBorderExt_FIELD(int draw_target)
 {
-  if (global.border_status >= GAME_MODE_TITLE &&
+  if (global.border_status >= GAME_MODE_MAIN &&
       global.border_status <= GAME_MODE_PLAYING &&
       border.draw_masked[global.border_status])
     DrawMaskedBorderExt_Rect(REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE,
@@ -353,8 +353,8 @@ static void DrawMaskedBorderExt_ALL(int draw_target)
 static void DrawMaskedBorderExt(int redraw_mask, int draw_target)
 {
   /* never draw masked screen borders on borderless screens */
-  if (game_status == GAME_MODE_LOADING ||
-      game_status == GAME_MODE_TITLE)
+  if (global.border_status == GAME_MODE_LOADING ||
+      global.border_status == GAME_MODE_TITLE)
     return;
 
   if (redraw_mask & REDRAW_ALL)