diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index 8bf5f7db0f..6d2b451920 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -56,7 +56,8 @@ namespace BizHawk.MultiClient ColecoController = new ColecoVisionControllerTemplate(true); - NESConsoleButtons = new NESConsoleButtonTemplate(); ; + NESConsoleButtons = new NESConsoleButtonTemplate(); + SMSConsoleButtons = new SMSConsoleButtonTemplate(); } // Directories @@ -634,11 +635,9 @@ namespace BizHawk.MultiClient public bool GGShowClippedRegions = false; public bool GGHighlightActiveDisplayRegion = false; - public string SmsReset = "C"; - public string SmsPause = "V, X1 Start"; - public SMSControllerTemplate[] SMSController = new SMSControllerTemplate[2]; public SMSControllerTemplate[] SMSAutoController = new SMSControllerTemplate[2]; + public SMSConsoleButtonTemplate SMSConsoleButtons = new SMSConsoleButtonTemplate(); // PCEngine Settings public bool PceSpriteLimit = false; @@ -723,8 +722,14 @@ namespace BizHawk.MultiClient public class NESConsoleButtonTemplate { - public string NESResetBindings = ""; - public string NESPowerBindings = ""; + public string Reset = ""; + public string Power = ""; + } + + public class SMSConsoleButtonTemplate + { + public string Reset = "C"; + public string Pause = "V, X1 Start"; } public class SMSControllerTemplate diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 6c208f88a7..454b66a457 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -733,8 +733,8 @@ namespace BizHawk.MultiClient Global.AutofireNullControls = new AutofireController(NullEmulator.NullController); var smsControls = new Controller(SMS.SmsController); - smsControls.BindMulti("Reset", Global.Config.SmsReset); - smsControls.BindMulti("Pause", Global.Config.SmsPause); + smsControls.BindMulti("Reset", Global.Config.SMSConsoleButtons.Reset); + smsControls.BindMulti("Pause", Global.Config.SMSConsoleButtons.Pause); for (int i = 0; i < 2; i++) { smsControls.BindMulti(string.Format("P{0} Up", i + 1), Global.Config.SMSController[i].Up); @@ -748,8 +748,8 @@ namespace BizHawk.MultiClient var asmsControls = new AutofireController(SMS.SmsController); asmsControls.Autofire = true; - asmsControls.BindMulti("Reset", Global.Config.SmsReset); - asmsControls.BindMulti("Pause", Global.Config.SmsPause); + asmsControls.BindMulti("Reset", Global.Config.SMSConsoleButtons.Reset); + asmsControls.BindMulti("Pause", Global.Config.SMSConsoleButtons.Pause); for (int i = 0; i < 2; i++) { asmsControls.BindMulti(string.Format("P{0} Up", i + 1), Global.Config.SMSAutoController[i].Up); @@ -844,8 +844,8 @@ namespace BizHawk.MultiClient nesControls.BindMulti("P" + (i + 1) + " Start", Global.Config.NESController[i].Start); } - nesControls.BindMulti("Reset", Global.Config.NESConsoleButtons.NESResetBindings); - nesControls.BindMulti("Power", Global.Config.NESConsoleButtons.NESPowerBindings); + nesControls.BindMulti("Reset", Global.Config.NESConsoleButtons.Reset); + nesControls.BindMulti("Power", Global.Config.NESConsoleButtons.Power); Global.NESControls = nesControls; diff --git a/BizHawk.MultiClient/config/ControllerConfig.Designer.cs b/BizHawk.MultiClient/config/ControllerConfig.Designer.cs index af602edfa6..7982f6265c 100644 --- a/BizHawk.MultiClient/config/ControllerConfig.Designer.cs +++ b/BizHawk.MultiClient/config/ControllerConfig.Designer.cs @@ -109,6 +109,7 @@ this.NESController2Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.NESController3Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.NESController4Panel = new BizHawk.MultiClient.ControllerConfigPanel(); + this.NESConsoleButtons = new BizHawk.MultiClient.ControllerConfigPanel(); this.NESAutofire1Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.NESAutofire2Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.NESAutofire3Panel = new BizHawk.MultiClient.ControllerConfigPanel(); @@ -127,6 +128,7 @@ this.GenesisAutofire1Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.SMSController1Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.SMSController2Panel = new BizHawk.MultiClient.ControllerConfigPanel(); + this.SMSConsoleButtons = new BizHawk.MultiClient.ControllerConfigPanel(); this.SMSAutofire1Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.SMSAutofire2Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.PCEController1Panel = new BizHawk.MultiClient.ControllerConfigPanel(); @@ -141,10 +143,10 @@ this.PCEAutofire5Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.Atari2600Controller1Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.Atari2600Controller2Panel = new BizHawk.MultiClient.ControllerConfigPanel(); + this.Atari2600ConsoleButtons = new BizHawk.MultiClient.ControllerConfigPanel(); this.Atari2600Autofire1Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.Atari2600Autofire2Panel = new BizHawk.MultiClient.ControllerConfigPanel(); this.TI83ControllerPanel = new BizHawk.MultiClient.ControllerConfigPanel(); - this.NESConsoleButtons = new BizHawk.MultiClient.ControllerConfigPanel(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ControllerImage)).BeginInit(); @@ -184,6 +186,7 @@ this.tabControl5.SuspendLayout(); this.tabPage33.SuspendLayout(); this.tabPage34.SuspendLayout(); + this.Console.SuspendLayout(); this.tabPage51.SuspendLayout(); this.tabPage57.SuspendLayout(); this.tabPage5.SuspendLayout(); @@ -204,6 +207,7 @@ this.tabControl7.SuspendLayout(); this.tabPage46.SuspendLayout(); this.tabPage47.SuspendLayout(); + this.tabPage48.SuspendLayout(); this.tabPage35.SuspendLayout(); this.tabPage58.SuspendLayout(); this.tabPage7.SuspendLayout(); @@ -715,6 +719,7 @@ // // Console // + this.Console.Controls.Add(this.SMSConsoleButtons); this.Console.Location = new System.Drawing.Point(4, 22); this.Console.Name = "Console"; this.Console.Size = new System.Drawing.Size(338, 375); @@ -954,6 +959,7 @@ // // tabPage48 // + this.tabPage48.Controls.Add(this.Atari2600ConsoleButtons); this.tabPage48.Location = new System.Drawing.Point(4, 22); this.tabPage48.Name = "tabPage48"; this.tabPage48.Size = new System.Drawing.Size(381, 375); @@ -1118,6 +1124,13 @@ this.NESController4Panel.Size = new System.Drawing.Size(392, 332); this.NESController4Panel.TabIndex = 0; // + // NESConsoleButtons + // + this.NESConsoleButtons.Location = new System.Drawing.Point(13, 12); + this.NESConsoleButtons.Name = "NESConsoleButtons"; + this.NESConsoleButtons.Size = new System.Drawing.Size(368, 125); + this.NESConsoleButtons.TabIndex = 0; + // // NESAutofire1Panel // this.NESAutofire1Panel.Location = new System.Drawing.Point(10, 10); @@ -1244,6 +1257,13 @@ this.SMSController2Panel.Size = new System.Drawing.Size(326, 332); this.SMSController2Panel.TabIndex = 2; // + // SMSConsoleButtons + // + this.SMSConsoleButtons.Location = new System.Drawing.Point(3, 3); + this.SMSConsoleButtons.Name = "SMSConsoleButtons"; + this.SMSConsoleButtons.Size = new System.Drawing.Size(332, 125); + this.SMSConsoleButtons.TabIndex = 1; + // // SMSAutofire1Panel // this.SMSAutofire1Panel.Location = new System.Drawing.Point(3, 3); @@ -1342,6 +1362,13 @@ this.Atari2600Controller2Panel.Size = new System.Drawing.Size(369, 332); this.Atari2600Controller2Panel.TabIndex = 2; // + // Atari2600ConsoleButtons + // + this.Atari2600ConsoleButtons.Location = new System.Drawing.Point(10, 12); + this.Atari2600ConsoleButtons.Name = "Atari2600ConsoleButtons"; + this.Atari2600ConsoleButtons.Size = new System.Drawing.Size(359, 125); + this.Atari2600ConsoleButtons.TabIndex = 1; + // // Atari2600Autofire1Panel // this.Atari2600Autofire1Panel.Location = new System.Drawing.Point(6, 21); @@ -1363,13 +1390,6 @@ this.TI83ControllerPanel.Size = new System.Drawing.Size(567, 404); this.TI83ControllerPanel.TabIndex = 1; // - // NESConsoleButtons - // - this.NESConsoleButtons.Location = new System.Drawing.Point(30, 25); - this.NESConsoleButtons.Name = "NESConsoleButtons"; - this.NESConsoleButtons.Size = new System.Drawing.Size(100, 20); - this.NESConsoleButtons.TabIndex = 0; - // // ControllerConfig // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1394,7 +1414,6 @@ this.tabPage15.ResumeLayout(false); this.tabPage16.ResumeLayout(false); this.tabPage17.ResumeLayout(false); - this.tabPage17.PerformLayout(); this.tabPage18.ResumeLayout(false); this.tabPage19.ResumeLayout(false); this.tabPage20.ResumeLayout(false); @@ -1425,6 +1444,7 @@ this.tabControl5.ResumeLayout(false); this.tabPage33.ResumeLayout(false); this.tabPage34.ResumeLayout(false); + this.Console.ResumeLayout(false); this.tabPage51.ResumeLayout(false); this.tabPage57.ResumeLayout(false); this.tabPage5.ResumeLayout(false); @@ -1445,6 +1465,7 @@ this.tabControl7.ResumeLayout(false); this.tabPage46.ResumeLayout(false); this.tabPage47.ResumeLayout(false); + this.tabPage48.ResumeLayout(false); this.tabPage35.ResumeLayout(false); this.tabPage58.ResumeLayout(false); this.tabPage7.ResumeLayout(false); @@ -1575,5 +1596,7 @@ private ControllerConfigPanel TI83ControllerPanel; private System.Windows.Forms.PictureBox pictureBox7; private BizHawk.MultiClient.ControllerConfigPanel NESConsoleButtons; + private ControllerConfigPanel SMSConsoleButtons; + private ControllerConfigPanel Atari2600ConsoleButtons; } } \ No newline at end of file diff --git a/BizHawk.MultiClient/config/ControllerConfig.cs b/BizHawk.MultiClient/config/ControllerConfig.cs index 3d34f7a0ea..2ca5cb57bc 100644 --- a/BizHawk.MultiClient/config/ControllerConfig.cs +++ b/BizHawk.MultiClient/config/ControllerConfig.cs @@ -26,6 +26,7 @@ namespace BizHawk.MultiClient NESController2Panel.LoadSettings(Global.Config.NESController[1]); NESController3Panel.LoadSettings(Global.Config.NESController[2]); NESController4Panel.LoadSettings(Global.Config.NESController[3]); + NESConsoleButtons.LoadSettings(Global.Config.NESConsoleButtons); NESAutofire1Panel.LoadSettings(Global.Config.NESAutoController[0]); NESAutofire2Panel.LoadSettings(Global.Config.NESAutoController[1]); NESAutofire3Panel.LoadSettings(Global.Config.NESAutoController[2]); @@ -48,6 +49,7 @@ namespace BizHawk.MultiClient SMSController1Panel.LoadSettings(Global.Config.SMSController[0]); SMSController2Panel.LoadSettings(Global.Config.SMSController[1]); + SMSConsoleButtons.LoadSettings(Global.Config.SMSConsoleButtons); SMSAutofire1Panel.LoadSettings(Global.Config.SMSAutoController[0]); SMSAutofire2Panel.LoadSettings(Global.Config.SMSAutoController[1]); @@ -64,11 +66,11 @@ namespace BizHawk.MultiClient Atari2600Controller1Panel.LoadSettings(Global.Config.Atari2600Controller[0]); Atari2600Controller2Panel.LoadSettings(Global.Config.Atari2600Controller[1]); + Atari2600ConsoleButtons.LoadSettings(Global.Config.Atari2600ConsoleButtons[0]); Atari2600Autofire1Panel.LoadSettings(Global.Config.Atari2600AutoController[0]); Atari2600Autofire2Panel.LoadSettings(Global.Config.Atari2600AutoController[1]); TI83ControllerPanel.LoadSettings(Global.Config.TI83Controller[0]); - NESConsoleButtons.LoadSettings(Global.Config.NESConsoleButtons); SetAutoTab(true); } @@ -155,6 +157,7 @@ namespace BizHawk.MultiClient } Global.OSD.AddMessage("Controller settings saved"); + this.DialogResult = DialogResult.OK; Close(); } diff --git a/BizHawk.MultiClient/config/InputConfig.cs b/BizHawk.MultiClient/config/InputConfig.cs index ecb1a69296..1f1af72776 100644 --- a/BizHawk.MultiClient/config/InputConfig.cs +++ b/BizHawk.MultiClient/config/InputConfig.cs @@ -245,9 +245,9 @@ namespace BizHawk.MultiClient field = obj.GetType().GetField(fieldName).GetValue(obj); } else if (button == 6) - field = Global.Config.SmsPause; + field = Global.Config.SMSConsoleButtons.Pause; else - field = Global.Config.SmsReset; + field = Global.Config.SMSConsoleButtons.Reset; break; } case "TI-83": @@ -428,9 +428,9 @@ namespace BizHawk.MultiClient buttonField.SetValue(obj, TempBox.Text); } else if (button == 6) - Global.Config.SmsPause = TempBox.Text; + Global.Config.SMSConsoleButtons.Pause = TempBox.Text; else - Global.Config.SmsReset = TempBox.Text; + Global.Config.SMSConsoleButtons.Reset = TempBox.Text; break; } case "TI-83":