fixed bug with using wrong global border when restarting the game 4.3.7.0
authorHolger Schemel <info@artsoft.org>
Thu, 26 Oct 2023 08:45:13 +0000 (10:45 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 26 Oct 2023 08:45:48 +0000 (10:45 +0200)
src/tools.c

index 70509ada55c319eeab519eccb11c9381643f26f2..6086cf25befdd3b1feaf61269286a47c2919b88a 100644 (file)
@@ -634,6 +634,10 @@ void DrawMaskedBorderToTarget(int draw_target)
       gfx.masked_border_bitmap_ptr = gfx.fade_bitmap_target;
     }
 
+    // always use global border for PLAYING when restarting the game
+    if (global.border_status == GAME_MODE_PSEUDO_RESTARTING)
+      global.border_status = GAME_MODE_PLAYING;
+
     DrawMaskedBorderExt(REDRAW_ALL, draw_target);
 
     global.border_status = last_border_status;
@@ -976,6 +980,10 @@ static void SetScreenStates_BeforeFadingOut(void)
 static void SetScreenStates_AfterFadingOut(void)
 {
   global.border_status = game_status;
+
+  // always use global border for PLAYING when restarting the game
+  if (global.border_status == GAME_MODE_PSEUDO_RESTARTING)
+    global.border_status = GAME_MODE_PLAYING;
 }
 
 void FadeIn(int fade_mask)