tastudio: finally make < > buttons operate identically to advance/rewind hotkeys
This commit is contained in:
parent
670501163b
commit
2b0dc82d16
|
@ -607,7 +607,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
public LoadRomArgs CurrentlyOpenRomArgs;
|
||||
public bool PauseAVI = false;
|
||||
public bool PressFrameAdvance = false;
|
||||
public bool PressRewind = false;
|
||||
public bool HoldFrameAdvance = false; // necessary for tastudio > button
|
||||
public bool PressRewind = false; // necessary for tastudio < button
|
||||
public bool FastForward = false;
|
||||
public bool TurboFastForward = false;
|
||||
public bool RestoreReadWriteOnStop = false;
|
||||
|
@ -2678,7 +2679,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
runFrame = true;
|
||||
}
|
||||
|
||||
if (Global.ClientControls["Frame Advance"] || PressFrameAdvance)
|
||||
if (Global.ClientControls["Frame Advance"] || PressFrameAdvance || HoldFrameAdvance)
|
||||
{
|
||||
// handle the initial trigger of a frame advance
|
||||
if (_frameAdvanceTimestamp == 0)
|
||||
|
@ -2890,7 +2891,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (Global.ClientControls["Rewind"] || PressRewind)
|
||||
{
|
||||
UpdateToolsAfter();
|
||||
PressRewind = false;
|
||||
//PressRewind = false;
|
||||
}
|
||||
|
||||
if (UpdateFrame)
|
||||
|
|
|
@ -127,6 +127,8 @@
|
|||
this.FrameAdvanceButton.Text = ">";
|
||||
this.FrameAdvanceButton.UseVisualStyleBackColor = true;
|
||||
this.FrameAdvanceButton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.FrameAdvanceButton_MouseDown);
|
||||
this.FrameAdvanceButton.MouseLeave += new System.EventHandler(this.FrameAdvanceButton_MouseLeave);
|
||||
this.FrameAdvanceButton.MouseUp += new System.Windows.Forms.MouseEventHandler(this.FrameAdvanceButton_MouseUp);
|
||||
//
|
||||
// PauseButton
|
||||
//
|
||||
|
@ -149,6 +151,8 @@
|
|||
this.RewindButton.Text = "<";
|
||||
this.RewindButton.UseVisualStyleBackColor = true;
|
||||
this.RewindButton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RewindButton_MouseDown);
|
||||
this.RewindButton.MouseLeave += new System.EventHandler(this.RewindButton_MouseLeave);
|
||||
this.RewindButton.MouseUp += new System.Windows.Forms.MouseEventHandler(this.RewindButton_MouseUp);
|
||||
//
|
||||
// PreviousMarkerButton
|
||||
//
|
||||
|
|
|
@ -115,53 +115,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
Tastudio.GoToPreviousMarker();
|
||||
}
|
||||
|
||||
private void RewindButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GlobalWin.MainForm.IsSeeking && !GlobalWin.MainForm.EmulatorPaused)
|
||||
{
|
||||
GlobalWin.MainForm.PauseOnFrame--;
|
||||
// that's a weird condition here, but for whatever reason it works best
|
||||
if (Global.Emulator.Frame >= GlobalWin.MainForm.PauseOnFrame)
|
||||
{
|
||||
GlobalWin.MainForm.PauseEmulator();
|
||||
GlobalWin.MainForm.PauseOnFrame = null;
|
||||
Tastudio.StopSeeking();
|
||||
Tastudio.GoToPreviousFrame();
|
||||
}
|
||||
Tastudio.RefreshDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
Tastudio.GoToPreviousFrame();
|
||||
}
|
||||
}
|
||||
|
||||
private void PauseButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Tastudio.TogglePause();
|
||||
}
|
||||
|
||||
private void FrameAdvanceButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GlobalWin.MainForm.IsSeeking && !GlobalWin.MainForm.EmulatorPaused)
|
||||
{
|
||||
GlobalWin.MainForm.PauseOnFrame++;
|
||||
// that's a weird condition here, but for whatever reason it works best
|
||||
if (Global.Emulator.Frame >= GlobalWin.MainForm.PauseOnFrame)
|
||||
{
|
||||
GlobalWin.MainForm.PauseEmulator();
|
||||
GlobalWin.MainForm.PauseOnFrame = null;
|
||||
Tastudio.StopSeeking();
|
||||
Tastudio.GoToNextFrame();
|
||||
}
|
||||
Tastudio.RefreshDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
Tastudio.GoToNextFrame();
|
||||
}
|
||||
}
|
||||
|
||||
private void NextMarkerButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Tastudio.GoToNextMarker();
|
||||
|
@ -204,12 +162,34 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void RewindButton_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
RewindButton_Click(sender, e);
|
||||
GlobalWin.MainForm.PressRewind = true;
|
||||
}
|
||||
|
||||
private void RewindButton_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
GlobalWin.MainForm.PressRewind = false;
|
||||
}
|
||||
|
||||
private void RewindButton_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
GlobalWin.MainForm.PressRewind = false;
|
||||
}
|
||||
|
||||
private void FrameAdvanceButton_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
FrameAdvanceButton_Click(sender, e);
|
||||
GlobalWin.MainForm.HoldFrameAdvance = true;
|
||||
}
|
||||
|
||||
private void FrameAdvanceButton_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
GlobalWin.MainForm.HoldFrameAdvance = false;
|
||||
}
|
||||
|
||||
private void FrameAdvanceButton_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
GlobalWin.MainForm.HoldFrameAdvance = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public bool Rewind()
|
||||
{
|
||||
// copypasted from TasView_MouseWheel(), just without notch logic
|
||||
if (GlobalWin.MainForm.IsSeeking)
|
||||
{
|
||||
GlobalWin.MainForm.PauseOnFrame--;
|
||||
|
|
|
@ -670,6 +670,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (notch > 1)
|
||||
notch *= 2;
|
||||
|
||||
// warning: tastudio rewind hotket/button logic is copypasted from here!
|
||||
if (GlobalWin.MainForm.IsSeeking && !GlobalWin.MainForm.EmulatorPaused)
|
||||
{
|
||||
GlobalWin.MainForm.PauseOnFrame -= notch;
|
||||
|
|
Loading…
Reference in New Issue