Fixed my previous commit/push; feos' change is back.

Improved "StartAtNearestFrameAndEmulate".
This commit is contained in:
Suuper 2015-07-13 14:02:21 -05:00
parent d84da62432
commit 228a24efb0
2 changed files with 22 additions and 13 deletions

View File

@ -35,6 +35,12 @@ namespace BizHawk.Client.EmuHawk
{
// Get as close as we can then emulate there
StartAtNearestFrameAndEmulate(frame);
if (TasPlaybackBox.FollowCursor)
{
SetVisibleIndex(frame);
}
return;
}
else // Emulate to a future frame

View File

@ -535,9 +535,12 @@ namespace BizHawk.Client.EmuHawk
private void StartAtNearestFrameAndEmulate(int frame)
{
if (frame == Emulator.Frame)
return;
CurrentTasMovie.SwitchToPlay();
KeyValuePair<int, byte[]> closestState = CurrentTasMovie.TasStateManager.GetStateClosestToFrame(frame);
if (closestState.Value != null)
if (closestState.Value != null && (frame < Emulator.Frame || closestState.Key > Emulator.Frame))
{
LoadState(closestState);
}