TAStudio - implement ClearPads() and Restart() and hook them up to the stop movie button. Fix Virtualpad objects so they don't crash on the Clear() function

This commit is contained in:
andres.delikat 2011-07-26 00:26:05 +00:00
parent ac032d1b92
commit de0e7770fc
3 changed files with 10 additions and 13 deletions

View File

@ -144,14 +144,20 @@ namespace BizHawk.MultiClient
Global.Config.TASWndy = this.Location.Y;
Global.Config.TASWidth = this.Right - this.Left;
Global.Config.TASHeight = this.Bottom - this.Top;
ClearPads();
}
public void ClearPads()
{
for (int x = 0; x < Pads.Count; x++)
Pads[x].Clear();
}
public void Restart()
{
TASView.Clear();
TASView.Update();
ClearPads();
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
@ -178,6 +184,7 @@ namespace BizHawk.MultiClient
private void StopButton_Click(object sender, EventArgs e)
{
Global.MainForm.StopMovie();
Restart();
}
private void FrameAdvanceButton_Click(object sender, EventArgs e)

View File

@ -201,11 +201,7 @@ namespace BizHawk.MultiClient
B2.Checked = false;
B3.Checked = false;
B4.Checked = false;
B5.Checked = false;
B6.Checked = false;
B7.Checked = false;
B8.Checked = false;
Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
Global.StickyXORAdapter.SetSticky(Controller + " Left", false);

View File

@ -171,13 +171,7 @@ namespace BizHawk.MultiClient
B1.Checked = false;
B2.Checked = false;
B3.Checked = false;
B4.Checked = false;
B5.Checked = false;
B6.Checked = false;
B7.Checked = false;
B8.Checked = false;
Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
Global.StickyXORAdapter.SetSticky(Controller + " Left", false);