Skip to content

Commit 014cd51

Browse files
committed
Fix a regression from commit 6c5447f that was causing states to be added out of order.
1 parent 89b459c commit 014cd51

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,21 @@ public void Capture(int frame, IStatable source, bool force = false)
319319
return;
320320
}
321321

322+
// We use the gap buffer for forced capture to avoid crowding the "current" buffer and thus reducing it's actual span of covered frames.
323+
if (force)
324+
{
325+
CaptureGap(frame, source);
326+
return;
327+
}
328+
322329
// We do not want to consider reserved states for a notion of Last
323330
// reserved states can include future states in the case of branch states
324-
if ((frame <= LastRing && NeedsGap(frame)) || force)
331+
if (frame <= LastRing)
325332
{
326-
// We use the gap buffer for forced capture to avoid crowding the "current" buffer and thus reducing it's actual span of covered frames.
327-
CaptureGap(frame, source);
333+
if (NeedsGap(frame))
334+
{
335+
CaptureGap(frame, source);
336+
}
328337
return;
329338
}
330339

0 commit comments

Comments
 (0)