Made public flags in main form so that dialogs can control frame advance & rewind. Hooked to TAStudio

This commit is contained in:
andres.delikat 2011-06-11 19:39:34 +00:00
parent e9381dc06e
commit 895915cd9f
3 changed files with 14 additions and 4 deletions

View File

@ -24,6 +24,10 @@ namespace BizHawk.MultiClient
//Movie variables
public Movie InputLog = new Movie("", MOVIEMODE.INACTIVE);
public Movie UserMovie = new Movie("", MOVIEMODE.INACTIVE);
public bool PressFrameAdvance = false;
public bool PressRewind = false;
public bool ReadOnly = true; //Global Movie Read only setting
//the currently selected savestate slot
@ -1127,7 +1131,7 @@ namespace BizHawk.MultiClient
double frameAdvanceTimestampDelta = (now - FrameAdvanceTimestamp).TotalMilliseconds;
bool frameProgressTimeElapsed = Global.Config.FrameProgressDelayMs < frameAdvanceTimestampDelta;
if (Global.ClientControls["Frame Advance"])
if (Global.ClientControls["Frame Advance"] || PressFrameAdvance)
{
//handle the initial trigger of a frame advance
if (FrameAdvanceTimestamp == DateTime.MinValue)
@ -1148,6 +1152,7 @@ namespace BizHawk.MultiClient
}
}
wasPressed = Global.ActiveController.GetControllersAsMnemonic();
PressFrameAdvance = false;
}
else
{
@ -1166,7 +1171,7 @@ namespace BizHawk.MultiClient
runFrame = true;
}
if (Global.Config.RewindEnabled && Global.ClientControls["Rewind"])
if (Global.Config.RewindEnabled && Global.ClientControls["Rewind"] || PressRewind)
{
rewindCredits += Global.Config.SpeedPercent;
int rewindTodo = rewindCredits / 100;
@ -1179,6 +1184,8 @@ namespace BizHawk.MultiClient
}
else
runFrame = false;
PressRewind = false;
}
else rewindCredits = 0;

View File

@ -123,6 +123,9 @@
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>126, 17</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>236, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>30</value>
</metadata>

View File

@ -84,12 +84,12 @@ namespace BizHawk.MultiClient
private void FrameAdvanceButton_Click(object sender, EventArgs e)
{
Global.MainForm.PressFrameAdvance = true;
}
private void RewindButton_Click(object sender, EventArgs e)
{
Global.MainForm.PressRewind = true;
}
private void PauseButton_Click(object sender, EventArgs e)