From 014cd51ae4dd6dc781376c8790037933f0f1ba6b Mon Sep 17 00:00:00 2001 From: SuuperW Date: Wed, 19 Jan 2022 11:33:40 -0600 Subject: [PATCH] Fix a regression from commit 6c5447f5da728fc3aef06220aa96049f4e8442f2 that was causing states to be added out of order. --- .../movie/tasproj/ZwinderStateManager.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs b/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs index 013036c83f..9875f8067d 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs @@ -319,12 +319,21 @@ namespace BizHawk.Client.Common return; } + // We use the gap buffer for forced capture to avoid crowding the "current" buffer and thus reducing it's actual span of covered frames. + if (force) + { + CaptureGap(frame, source); + return; + } + // We do not want to consider reserved states for a notion of Last // reserved states can include future states in the case of branch states - if ((frame <= LastRing && NeedsGap(frame)) || force) + if (frame <= LastRing) { - // We use the gap buffer for forced capture to avoid crowding the "current" buffer and thus reducing it's actual span of covered frames. - CaptureGap(frame, source); + if (NeedsGap(frame)) + { + CaptureGap(frame, source); + } return; }