added pausing tape after replaying not only for warp mode (again)
authorHolger Schemel <info@artsoft.org>
Sat, 28 Jan 2023 12:41:35 +0000 (13:41 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 28 Jan 2023 12:41:35 +0000 (13:41 +0100)
This adds the previously reverted change of commit 31df2f98 again,
but should fix the problems that it caused when unpausing the tape
after replaying until the end of the tape and entering pause mode.

src/tape.c

index 55991ce9b574f03d04789d24fb4cfb93ddad4a60..f16e7ec9451a20ab68068add00155ed01870088a 100644 (file)
@@ -936,6 +936,10 @@ void TapeTogglePause(boolean toggle_mode)
 
     ModifyPauseButtons();
   }
+
+  // stop tape when leaving auto-pause after completely replaying tape
+  if (tape.playing && !tape.pausing && tape.counter >= tape.length)
+    TapeStop();
 }
 
 void TapeStartPlaying(void)
@@ -1007,7 +1011,7 @@ byte *TapePlayAction(void)
 
   if (tape.counter >= tape.length)     // end of tape reached
   {
-    if (tape.warp_forward && !tape.auto_play)
+    if (!tape.auto_play)
     {
       TapeStopWarpForward();
       TapeTogglePause(TAPE_TOGGLE_MANUAL);