Fix a regression from commit 6c5447f5da that was causing states to be added out of order.

This commit is contained in:
SuuperW 2022-01-19 11:33:40 -06:00
parent 89b459c44d
commit 014cd51ae4
1 changed files with 12 additions and 3 deletions

View File

@ -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;
}