tastudio: < and > buttons behave as mouse wheel when seeking

This commit is contained in:
feos 2016-08-22 19:39:05 +03:00
parent e379b0342e
commit 54bd6b90fe
2 changed files with 39 additions and 3 deletions

View File

@ -116,9 +116,23 @@ namespace BizHawk.Client.EmuHawk
}
private void RewindButton_Click(object sender, EventArgs e)
{
if (GlobalWin.MainForm.IsSeeking)
{
GlobalWin.MainForm.PauseOnFrame--;
if (Global.Emulator.Frame == GlobalWin.MainForm.PauseOnFrame)
{
GlobalWin.MainForm.PauseEmulator();
GlobalWin.MainForm.PauseOnFrame = null;
Tastudio.StopSeeking();
}
Tastudio.RefreshDialog();
}
else
{
Tastudio.GoToPreviousFrame();
}
}
private void PauseButton_Click(object sender, EventArgs e)
{
@ -128,9 +142,17 @@ namespace BizHawk.Client.EmuHawk
}
private void FrameAdvanceButton_Click(object sender, EventArgs e)
{
if (GlobalWin.MainForm.IsSeeking)
{
GlobalWin.MainForm.PauseOnFrame++;
Tastudio.RefreshDialog();
}
else
{
Tastudio.GoToNextFrame();
}
}
private void NextMarkerButton_Click(object sender, EventArgs e)
{

View File

@ -78,7 +78,21 @@ namespace BizHawk.Client.EmuHawk
public bool Rewind()
{
GoToPreviousFrame(); // todo: behave as normal rewind in differentiating between hitting rewind once and holding it.
//if (GlobalWin.MainForm.IsSeeking)
//{
// GlobalWin.MainForm.PauseOnFrame--;
// if (Emulator.Frame == GlobalWin.MainForm.PauseOnFrame)
// {
// GlobalWin.MainForm.PauseEmulator();
// GlobalWin.MainForm.PauseOnFrame = null;
// StopSeeking();
// }
// RefreshDialog();
//}
//else
//{
GoToPreviousFrame();
//}
return true;
}