taseditor: fix LastPositionFrame resets
This commit is contained in:
parent
0246c952eb
commit
4f24682289
|
@ -85,6 +85,7 @@ namespace BizHawk.Client.Common
|
|||
public TasMovieMarkerList Markers { get; set; }
|
||||
public bool BindMarkersToInput { get; set; }
|
||||
public bool UseInputCache { get; set; }
|
||||
public bool LastPositionStable = true;
|
||||
public string NewBranchText = "";
|
||||
public int CurrentBranch { get; set; }
|
||||
public int BranchCount { get { return Branches.Count; } }
|
||||
|
@ -310,12 +311,18 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public void GreenzoneCurrentFrame()
|
||||
{
|
||||
LagLog[Global.Emulator.Frame] = Global.Emulator.AsInputPollable().IsLagFrame;
|
||||
if (Global.Emulator.Frame > LastValidFrame)
|
||||
{
|
||||
// emulated a new frame, current editing segment may change now. taseditor logic
|
||||
LastPositionStable = false;
|
||||
}
|
||||
|
||||
if (!StateManager.HasState(Global.Emulator.Frame))
|
||||
{
|
||||
StateManager.Capture();
|
||||
}
|
||||
LagLog[Global.Emulator.Frame] = Global.Emulator.AsInputPollable().IsLagFrame;
|
||||
|
||||
if (!StateManager.HasState(Global.Emulator.Frame))
|
||||
{
|
||||
StateManager.Capture();
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearLagLog()
|
||||
|
|
|
@ -470,8 +470,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
bool wasPaused = GlobalWin.MainForm.EmulatorPaused;
|
||||
|
||||
if (wasPaused && !GlobalWin.MainForm.IsSeeking)
|
||||
LastPositionFrame = Emulator.Frame;
|
||||
if (Emulator.Frame > frame || CurrentTasMovie.LastValidFrame > frame)
|
||||
{
|
||||
if (wasPaused && !GlobalWin.MainForm.IsSeeking && !CurrentTasMovie.LastPositionStable)
|
||||
{
|
||||
LastPositionFrame = Emulator.Frame;
|
||||
CurrentTasMovie.LastPositionStable = true; // until new frame is emulated
|
||||
}
|
||||
}
|
||||
|
||||
if (Global.MovieSession.MovieControllerAdapter.Type.BoolButtons.Contains(buttonName))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue