TAstudio - a better place to put autorestore logic, still a lot of brokenness though

This commit is contained in:
adelikat 2014-08-29 15:27:51 +00:00
parent ae45a8452b
commit 1c89ba9ec5
2 changed files with 8 additions and 6 deletions

View File

@ -216,12 +216,6 @@ namespace BizHawk.Client.EmuHawk
GoToLastEmulatedFrameIfNecessary(TasView.CurrentCell.RowIndex.Value); GoToLastEmulatedFrameIfNecessary(TasView.CurrentCell.RowIndex.Value);
TasView.Refresh(); TasView.Refresh();
if (Global.Config.TAStudioAutoRestoreLastPosition)
{
GlobalWin.MainForm.UnpauseEmulator();
GlobalWin.MainForm.PauseOnFrame = Global.Emulator.Frame;
}
_startBoolDrawColumn = buttonName; _startBoolDrawColumn = buttonName;
_boolPaintState = _currentTasMovie.BoolIsPressed(frame, buttonName); _boolPaintState = _currentTasMovie.BoolIsPressed(frame, buttonName);
} }

View File

@ -173,9 +173,17 @@ namespace BizHawk.Client.EmuHawk
{ {
if (frame != Global.Emulator.Frame) // Don't go to a frame if you are already on it! if (frame != Global.Emulator.Frame) // Don't go to a frame if you are already on it!
{ {
var restoreFrame = Global.Emulator.Frame;
if (frame <= _currentTasMovie.LastEmulatedFrame) if (frame <= _currentTasMovie.LastEmulatedFrame)
{ {
GoToFrame(frame); GoToFrame(frame);
if (Global.Config.TAStudioAutoRestoreLastPosition)
{
GlobalWin.MainForm.UnpauseEmulator();
GlobalWin.MainForm.PauseOnFrame = restoreFrame;
}
} }
} }
} }