Fix bugs in input config regarding atari controllers, fix auto-fire controllers for atari (both controllers)

This commit is contained in:
adelikat 2012-03-23 02:15:58 +00:00
parent 715d46ed1d
commit 2e5ec4fdcb
3 changed files with 17 additions and 19 deletions

View File

@ -1092,8 +1092,6 @@ namespace BizHawk.MultiClient
Global.MainForm.SetReadOnly(true);
else
Global.MainForm.SetReadOnly(false);
}
//----------------------------------------------------

View File

@ -691,15 +691,15 @@ namespace BizHawk.MultiClient
Global.Atari2600Controls = a2600Controls;
var autofireA2600Controls = new AutofireController(Atari2600.Atari2600ControllerDefinition);
autofireA2600Controls.BindMulti("P1 Up", Global.Config.Atari2600Controller[0].Up);
autofireA2600Controls.BindMulti("P1 Left", Global.Config.Atari2600Controller[0].Left);
autofireA2600Controls.BindMulti("P1 Right", Global.Config.Atari2600Controller[0].Right);
autofireA2600Controls.BindMulti("P1 Down", Global.Config.Atari2600Controller[0].Down);
autofireA2600Controls.BindMulti("P1 Button", Global.Config.Atari2600Controller[0].Button);
autofireA2600Controls.BindMulti("P2 Up", Global.Config.Atari2600Controller[1].Up);
autofireA2600Controls.BindMulti("P2 Left", Global.Config.Atari2600Controller[1].Left);
autofireA2600Controls.BindMulti("P2 Right", Global.Config.Atari2600Controller[1].Right);
autofireA2600Controls.BindMulti("P2 Down", Global.Config.Atari2600Controller[1].Down);
autofireA2600Controls.BindMulti("P1 Up", Global.Config.Atari2600AutoController[0].Up);
autofireA2600Controls.BindMulti("P1 Left", Global.Config.Atari2600AutoController[0].Left);
autofireA2600Controls.BindMulti("P1 Right", Global.Config.Atari2600AutoController[0].Right);
autofireA2600Controls.BindMulti("P1 Down", Global.Config.Atari2600AutoController[0].Down);
autofireA2600Controls.BindMulti("P1 Button", Global.Config.Atari2600AutoController[0].Button);
autofireA2600Controls.BindMulti("P2 Up", Global.Config.Atari2600AutoController[1].Up);
autofireA2600Controls.BindMulti("P2 Left", Global.Config.Atari2600AutoController[1].Left);
autofireA2600Controls.BindMulti("P2 Right", Global.Config.Atari2600AutoController[1].Right);
autofireA2600Controls.BindMulti("P2 Down", Global.Config.Atari2600AutoController[1].Down);
autofireA2600Controls.BindMulti("P2 Button", Global.Config.Atari2600Controller[1].Button);
Global.AutofireAtari2600Controls = autofireA2600Controls;

View File

@ -118,8 +118,8 @@ namespace BizHawk.MultiClient
ButtonsGroupBox.Controls.Clear();
InputWidget TempBox;
Label TempLabel;
if (prev < 2)
int controllers = 2;
if (prev < controllers)
{
TempBox = TextBoxes[0] as InputWidget;
Global.Config.Atari2600Controller[prev].Up = AppendButtonMapping(TempBox.Text, Global.Config.Atari2600Controller[prev].Up);
@ -142,22 +142,22 @@ namespace BizHawk.MultiClient
else
{
TempBox = TextBoxes[0] as InputWidget;
Global.Config.Atari2600AutoController[prev - 1].Up = AppendButtonMapping(TempBox.Text, Global.Config.Atari2600AutoController[prev - 1].Up);
Global.Config.Atari2600AutoController[prev - controllers].Up = AppendButtonMapping(TempBox.Text, Global.Config.Atari2600AutoController[prev - 1].Up);
TempBox.Dispose();
TempBox = TextBoxes[1] as InputWidget;
Global.Config.Atari2600AutoController[prev - 1].Down = AppendButtonMapping(TempBox.Text, Global.Config.Atari2600AutoController[prev - 1].Down);
Global.Config.Atari2600AutoController[prev - controllers].Down = AppendButtonMapping(TempBox.Text, Global.Config.Atari2600AutoController[prev - 1].Down);
TempBox.Dispose();
TempBox = TextBoxes[2] as InputWidget;
Global.Config.Atari2600AutoController[prev - 1].Left = AppendButtonMapping(TempBox.Text, Global.Config.Atari2600AutoController[prev - 1].Left);
Global.Config.Atari2600AutoController[prev - controllers].Left = AppendButtonMapping(TempBox.Text, Global.Config.Atari2600AutoController[prev - 1].Left);
TempBox.Dispose();
TempBox = TextBoxes[3] as InputWidget;
Global.Config.Atari2600AutoController[prev - 1].Right = AppendButtonMapping(TempBox.Text, Global.Config.Atari2600AutoController[prev - 1].Right);
Global.Config.Atari2600AutoController[prev - controllers].Right = AppendButtonMapping(TempBox.Text, Global.Config.Atari2600AutoController[prev - 1].Right);
TempBox.Dispose();
TempBox = TextBoxes[4] as InputWidget;
Global.Config.Atari2600AutoController[prev - 1].Button = AppendButtonMapping(TempBox.Text, Global.Config.Atari2600AutoController[prev - 1].Button);
Global.Config.Atari2600AutoController[prev - controllers].Button = AppendButtonMapping(TempBox.Text, Global.Config.Atari2600AutoController[prev - 1].Button);
TempBox.Dispose();
Global.Config.Atari2600Controller[prev - 1].Enabled = IDX_CONTROLLERENABLED.Checked;
Global.Config.Atari2600AutoController[prev - controllers].Enabled = IDX_CONTROLLERENABLED.Checked;
}
TempBox.Dispose();
for (int i = 0; i < AtariControlList.Length; i++)