tastudio: properly handle global rewind function (step'n'run)
not attaching it to playback buttons, because they're obsolete and because they kinda simulate holding anyway.
This commit is contained in:
parent
346c4e56b3
commit
bade8f9217
|
@ -4028,16 +4028,37 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private bool Rewind(ref bool runFrame, long currentTimestamp)
|
||||
{
|
||||
var isRewinding = false;
|
||||
|
||||
if (IsSlave && master.WantsToControlRewind)
|
||||
{
|
||||
if (Global.ClientControls["Rewind"] || PressRewind)
|
||||
{
|
||||
runFrame = true; // TODO: the master should be deciding this!
|
||||
return master.Rewind();
|
||||
if (_frameRewindTimestamp == 0)
|
||||
{
|
||||
isRewinding = true;
|
||||
_frameRewindTimestamp = currentTimestamp;
|
||||
}
|
||||
else
|
||||
{
|
||||
double timestampDeltaMs = (double)(currentTimestamp - _frameRewindTimestamp) / Stopwatch.Frequency * 1000.0;
|
||||
isRewinding = timestampDeltaMs >= Global.Config.FrameProgressDelayMs;
|
||||
}
|
||||
|
||||
if (isRewinding)
|
||||
{
|
||||
runFrame = true; // TODO: the master should be deciding this!
|
||||
master.Rewind();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_frameRewindTimestamp = 0;
|
||||
}
|
||||
|
||||
return isRewinding;
|
||||
}
|
||||
|
||||
var isRewinding = false;
|
||||
if (Global.Rewinder.RewindActive && (Global.ClientControls["Rewind"] || PressRewind)
|
||||
&& !Global.MovieSession.Movie.IsRecording) // Rewind isn't "bulletproof" and can desync a recording movie!
|
||||
{
|
||||
|
|
|
@ -1178,7 +1178,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.TASEditorManualOnlineMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Help;
|
||||
this.TASEditorManualOnlineMenuItem.Name = "TASEditorManualOnlineMenuItem";
|
||||
this.TASEditorManualOnlineMenuItem.Size = new System.Drawing.Size(214, 22);
|
||||
this.TASEditorManualOnlineMenuItem.Text = "TASEditor Manual Online...";
|
||||
this.TASEditorManualOnlineMenuItem.Text = "TAS Editor Manual Online...";
|
||||
this.TASEditorManualOnlineMenuItem.Click += new System.EventHandler(this.TASEditorManualOnlineMenuItem_Click);
|
||||
//
|
||||
// ForumThreadMenuItem
|
||||
|
|
Loading…
Reference in New Issue