From 7d95e685acdc31fd8985cae6f63d06188a17d287 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 8 Mar 2024 13:48:54 -0500 Subject: [PATCH] command stream ending fix? --- src/engine/cmdStreamOps.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/engine/cmdStreamOps.cpp b/src/engine/cmdStreamOps.cpp index 1d8b24fb8..7d50c7a60 100644 --- a/src/engine/cmdStreamOps.cpp +++ b/src/engine/cmdStreamOps.cpp @@ -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