tastudio states decay: fix logic for last edited frame

This commit is contained in:
feos 2018-08-22 20:04:57 +03:00
parent d28e4e9f70
commit a365284383
1 changed files with 7 additions and 3 deletions

View File

@ -79,7 +79,11 @@ namespace BizHawk.Client.Common
{ {
continue; continue;
} }
else if ((currentFrame % _step > 0) && (currentFrame + 1 != _tsm.LastEditedFrame)) else if (currentFrame + 1 == _tsm.LastEditedFrame)
{
continue;
}
else if (currentFrame % _step > 0)
{ {
// 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))
@ -190,8 +194,8 @@ namespace BizHawk.Client.Common
} }
else else
{ {
// we're very sorry about failing to find states to remove, but we can't go beyond capacity, so remove at least something // we're very sorry about failing to find states to remove, but we can't go beyond capacity, so remove at least something
// this shouldn't happen, but if we don't do it here, nothing good will happen either // this shouldn't happen, but if we don't do it here, nothing good will happen either
if (_tsm.RemoveState(_tsm.GetStateFrameByIndex(1))) if (_tsm.RemoveState(_tsm.GetStateFrameByIndex(1)))
{ {
// decrementing this if no state was removed is BAD // decrementing this if no state was removed is BAD