Tastudio - fix some go to frame logic, but probably broke stuff too
This commit is contained in:
parent
ea3f86c11e
commit
624ad32d4e
|
@ -122,14 +122,6 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
if (States.Count > 0 && frame > 0) // Never invalidate frame 0, TODO: Only if movie is a power-on movie should we keep frame 0, check this
|
||||
{
|
||||
// TODO be more efficient, this could get slow
|
||||
//while (LastKey >= frame)
|
||||
//{
|
||||
// var state = States[LastKey];
|
||||
// Used -= state.Length;
|
||||
// States.RemoveAt(States.Count - 1);
|
||||
//}
|
||||
|
||||
var statesToRemove = States
|
||||
.Where(x => x.Key >= frame)
|
||||
.ToList();
|
||||
|
|
|
@ -190,20 +190,27 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
// TODO: a better name
|
||||
/// <summary>
|
||||
/// Only goes to go to the frame if it is an event before current emulation, otherwise it is just a future event that can freely be edited
|
||||
/// </summary>
|
||||
private void GoToLastEmulatedFrameIfNecessary(int frame)
|
||||
{
|
||||
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 <= Global.Emulator.Frame)
|
||||
{
|
||||
GoToFrame(frame);
|
||||
}
|
||||
|
||||
if (Global.Config.TAStudioAutoRestoreLastPosition)
|
||||
if (Global.Config.TAStudioAutoRestoreLastPosition)
|
||||
{
|
||||
if (restoreFrame > Global.Emulator.Frame) // Don't unpause if we are already on the desired frame, else runaway seek
|
||||
{
|
||||
GlobalWin.MainForm.UnpauseEmulator();
|
||||
GlobalWin.MainForm.PauseOnFrame = restoreFrame;
|
||||
|
||||
GlobalWin.MainForm.UnpauseEmulator();
|
||||
GlobalWin.MainForm.PauseOnFrame = restoreFrame;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue