tastudio: actually don't drop state above last edited frame

This commit is contained in:
feos 2018-05-10 20:32:26 +03:00
parent de00fbaf19
commit a0e5e0e593
2 changed files with 3 additions and 2 deletions

View File

@ -79,7 +79,7 @@ namespace BizHawk.Client.Common
{ {
continue; continue;
} }
else if (currentFrame % _step > 0) else if ((currentFrame % _step > 0) && (currentFrame + 1 != _tsm.LastEditedFrame))
{ {
// ignore the pattern if the state doesn't belong already, drop it blindly and skip everything // ignore the pattern if the state doesn't belong already, drop it blindly and skip everything
if (_tsm.RemoveState(currentFrame)) if (_tsm.RemoveState(currentFrame))
@ -120,7 +120,7 @@ namespace BizHawk.Client.Common
{ {
continue; continue;
} }
else if (currentFrame % _step > 0) else if ((currentFrame % _step > 0) && (currentFrame + 1 != _tsm.LastEditedFrame))
{ {
// ignore the pattern if the state doesn't belong already, drop it blindly and skip everything // ignore the pattern if the state doesn't belong already, drop it blindly and skip everything
if (_tsm.RemoveState(currentFrame)) if (_tsm.RemoveState(currentFrame))

View File

@ -505,6 +505,7 @@ namespace BizHawk.Client.Common
} }
public int StateCount => _states.Count; public int StateCount => _states.Count;
public int LastEditedFrame => _movie.LastEditedFrame;
public bool Any() public bool Any()
{ {