command stream ending fix?

This commit is contained in:
tildearrow 2024-03-08 13:48:54 -05:00
parent 1e221393c4
commit 7d95e685ac

View file

@ -293,12 +293,13 @@ SafeWriter* DivEngine::saveCommand(bool binary) {
int lastTick[DIV_MAX_CHANS];
memset(lastTick,0,DIV_MAX_CHANS*sizeof(int));
bool wroteTickGlobal=false;
while (!done) {
if (nextTick(false,true) || !playing) {
done=true;
}
// get command stream
bool wroteTickGlobal=false;
wroteTickGlobal=false;
memset(wroteTick,0,DIV_MAX_CHANS*sizeof(bool));
if (curDivider!=divider) {
curDivider=divider;
@ -339,6 +340,11 @@ SafeWriter* DivEngine::saveCommand(bool binary) {
cmdStream.clear();
tick++;
}
wroteTickGlobal=false;
memset(wroteTick,0,DIV_MAX_CHANS*sizeof(bool));
for (int i=0; i<chans; i++) {
WRITE_TICK(i);
}
cmdStreamEnabled=oldCmdStreamEnabled;
if (binary) {