Tastudio - don't attempt to load the nearest greenzone if there isn't even a single greenzone entry

This commit is contained in:
adelikat 2014-09-19 21:05:48 +00:00
parent d6859b64a3
commit c18410d4af
1 changed files with 7 additions and 3 deletions

View File

@ -334,7 +334,12 @@ namespace BizHawk.Client.EmuHawk
{
// TODO: get the last greenzone frame and go there
_currentTasMovie.SwitchToPlay();
if (_currentTasMovie.LastEmulatedFrame > 0)
{
Global.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(_currentTasMovie[_currentTasMovie.LastEmulatedFrame].State.ToArray())));
}
GlobalWin.MainForm.UnpauseEmulator();
if (Global.Config.TAStudioAutoPause)
{
@ -344,7 +349,6 @@ namespace BizHawk.Client.EmuHawk
{
GlobalWin.MainForm.PauseOnFrame = frame;
}
}
RefreshDialog();