TAStudio: do not seek when needing to load greenzone on paint
This commit is contained in:
parent
f721dad395
commit
5626edf43d
|
@ -67,11 +67,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
public AutoPatternBool[] BoolPatterns;
|
||||
public AutoPatternAxis[] AxisPatterns;
|
||||
|
||||
public void JumpToGreenzone()
|
||||
public void JumpToGreenzone(bool OnLeftMouseDown = false)
|
||||
{
|
||||
if (Emulator.Frame > CurrentTasMovie.LastEditedFrame)
|
||||
{
|
||||
GoToLastEmulatedFrameIfNecessary(CurrentTasMovie.LastEditedFrame);
|
||||
GoToLastEmulatedFrameIfNecessary(CurrentTasMovie.LastEditedFrame, OnLeftMouseDown);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -611,7 +611,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (TasView.CurrentCell.Column.Name == CursorColumnName)
|
||||
{
|
||||
_startCursorDrag = true;
|
||||
GoToFrame(TasView.CurrentCell.RowIndex.Value);
|
||||
GoToFrame(TasView.CurrentCell.RowIndex.Value, false, false, true);
|
||||
}
|
||||
else if (TasView.CurrentCell.Column.Name == FrameColumnName)
|
||||
{
|
||||
|
@ -673,7 +673,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
CurrentTasMovie.SetBoolStates(firstSel, (frame - firstSel) + 1, buttonName, !allPressed);
|
||||
_boolPaintState = CurrentTasMovie.BoolIsPressed(frame, buttonName);
|
||||
_triggerAutoRestore = true;
|
||||
JumpToGreenzone();
|
||||
JumpToGreenzone(true);
|
||||
RefreshDialog();
|
||||
}
|
||||
else if (ModifierKeys == Keys.Shift && ModifierKeys == Keys.Alt) // Does not work?
|
||||
|
@ -687,7 +687,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
CurrentTasMovie.ToggleBoolState(TasView.CurrentCell.RowIndex.Value, buttonName);
|
||||
_boolPaintState = CurrentTasMovie.BoolIsPressed(frame, buttonName);
|
||||
_triggerAutoRestore = true;
|
||||
JumpToGreenzone();
|
||||
JumpToGreenzone(true);
|
||||
RefreshDialog();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
/// <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)
|
||||
private void GoToLastEmulatedFrameIfNecessary(int frame, bool OnLeftMouseDown = false)
|
||||
{
|
||||
if (frame != Emulator.Frame) // Don't go to a frame if you are already on it!
|
||||
{
|
||||
|
@ -20,12 +20,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
CurrentTasMovie.LastPositionStable = true; // until new frame is emulated
|
||||
}
|
||||
|
||||
GoToFrame(frame);
|
||||
GoToFrame(frame, false, false, OnLeftMouseDown);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void GoToFrame(int frame, bool fromLua = false, bool fromRewinding = false)
|
||||
public void GoToFrame(int frame, bool fromLua = false, bool fromRewinding = false, bool OnLeftMouseDown = false)
|
||||
{
|
||||
// If seeking to a frame before or at the end of the movie, use StartAtNearestFrameAndEmulate
|
||||
// Otherwise, load the latest state (if not already there) and seek while recording.
|
||||
|
@ -35,7 +35,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
// Get as close as we can then emulate there
|
||||
StartAtNearestFrameAndEmulate(frame, fromLua, fromRewinding);
|
||||
MaybeFollowCursor();
|
||||
if (!OnLeftMouseDown) { MaybeFollowCursor(); }
|
||||
}
|
||||
else // Emulate to a future frame
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue