X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=0a7dffc3db840681520a6c5fdb371cb155009772;hb=50e4527296975a023abb478de62b425936f423c0;hp=c0939acd8dbd87c752c4aa143dfa203d37d60182;hpb=22846a3ec9df44b291989369ae220060ecd57bcb;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index c0939acd..0a7dffc3 100644 --- a/src/tape.c +++ b/src/tape.c @@ -779,7 +779,9 @@ static void TapeAppendRecording(void) void TapeHaltRecording(void) { - tape.counter++; + // only advance tape counter if any input events have been recorded + if (tape.pos[tape.counter].delay > 0) + tape.counter++; // initialize delay for next tape entry (to be able to continue recording) if (tape.counter < MAX_TAPE_LEN) @@ -834,6 +836,8 @@ boolean TapeAddAction(byte action[MAX_TAPE_ACTIONS]) tape.pos[tape.counter].delay++; } + tape.changed = TRUE; + return TRUE; } @@ -1199,8 +1203,7 @@ void TapeQuickSave(void) return; } - if (tape.recording) - TapeHaltRecording(); // prepare tape for saving on-the-fly + TapeHaltRecording(); // prepare tape for saving on-the-fly if (TAPE_IS_EMPTY(tape)) {