fixed updating multiple pause button gadgets when toggling pause mode
[rocksndiamonds.git] / src / tape.c
index 852b82d77701274131a566cfab4cf807c55eed3b..43c3c30699807efed1332e53488ab6adbf02ae5a 100644 (file)
@@ -596,6 +596,10 @@ void TapeStartRecording(int random_seed)
 
   SetDrawDeactivationMask(REDRAW_NONE);
   audio.sound_deactivated = FALSE;
+
+  // required here to update video display if tape door is closed
+  if (GetDoorState() & DOOR_CLOSE_2)
+    OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW);
 }
 
 static void TapeStartGameRecording(void)
@@ -760,14 +764,17 @@ void TapeTogglePause(boolean toggle_mode)
     return;
   }
 
-  if (setup.show_snapshot_buttons &&
-      game_status == GAME_MODE_PLAYING &&
-      CheckEngineSnapshotList())
+  if (game_status == GAME_MODE_PLAYING)
   {
-    if (tape.pausing)
-      MapUndoRedoButtons();
-    else if (!tape.single_step)
-      UnmapUndoRedoButtons();
+    if (setup.show_snapshot_buttons && CheckEngineSnapshotList())
+    {
+      if (tape.pausing)
+       MapUndoRedoButtons();
+      else if (!tape.single_step)
+       UnmapUndoRedoButtons();
+    }
+
+    ModifyPauseButtons();
   }
 }
 
@@ -1405,9 +1412,6 @@ void RedrawTapeButtons(void)
 
   if (tape.show_game_buttons)
     RedrawGameButtonsOnTape();
-
-  // RedrawGadget() may have set REDRAW_ALL if buttons are defined off-area
-  redraw_mask &= ~REDRAW_ALL;
 }
 
 void RedrawOrRemapTapeButtons(void)