TasMovie - InvalidateAfter - flag changes if Lag OR States were invalidated, increment rerecords on only on state invalidation not lag validation, this may address 2168

This commit is contained in:
adelikat 2020-07-21 16:45:36 -05:00
parent 4439310250
commit 4a6b3e407a
1 changed files with 5 additions and 4 deletions

View File

@ -109,15 +109,16 @@ namespace BizHawk.Client.Common
// Removes lag log and greenzone after this frame
private void InvalidateAfter(int frame)
{
var anyInvalidated = LagLog.RemoveFrom(frame);
TasStateManager.Invalidate(frame + 1);
if (anyInvalidated)
var anyLagInvalidated = LagLog.RemoveFrom(frame);
var anyStateInvalidated = TasStateManager.Invalidate(frame + 1);
if (anyLagInvalidated || anyStateInvalidated)
{
Changes = true;
}
LastEditedFrame = frame;
if (anyInvalidated && IsCountingRerecords)
if (anyStateInvalidated && IsCountingRerecords)
{
Rerecords++;
}