diff --git a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
index e18f34f62e..5227163ea3 100644
--- a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
+++ b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
@@ -299,6 +299,18 @@
MessageConfig.cs
+
+ UserControl
+
+
+ N64ControllerSettingControl.cs
+
+
+ Form
+
+
+ N64ControllersSetup.cs
+
Form
@@ -1018,6 +1030,12 @@
InputCompositeWidget.cs
+
+ N64ControllerSettingControl.cs
+
+
+ N64ControllersSetup.cs
+
N64VideoPluginconfig.cs
diff --git a/BizHawk.Client.EmuHawk/MainForm.Designer.cs b/BizHawk.Client.EmuHawk/MainForm.Designer.cs
index f88c0957cf..96d5fe3b5d 100644
--- a/BizHawk.Client.EmuHawk/MainForm.Designer.cs
+++ b/BizHawk.Client.EmuHawk/MainForm.Designer.cs
@@ -337,6 +337,7 @@
this.toolStripMenuItem13 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem14 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem();
+ this.customizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator30 = new System.Windows.Forms.ToolStripSeparator();
this.SavestateTypeContextSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.SavestateTypeDefaultContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -353,7 +354,7 @@
this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.customizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.controllerSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MainformMenu.SuspendLayout();
this.MainStatusBar.SuspendLayout();
this.MainFormContextMenu.SuspendLayout();
@@ -385,7 +386,7 @@
this.MainformMenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
this.MainformMenu.Location = new System.Drawing.Point(0, 0);
this.MainformMenu.Name = "MainformMenu";
- this.MainformMenu.Size = new System.Drawing.Size(470, 42);
+ this.MainformMenu.Size = new System.Drawing.Size(470, 61);
this.MainformMenu.TabIndex = 0;
this.MainformMenu.Text = "menuStrip1";
this.MainformMenu.MenuActivate += new System.EventHandler(this.MainformMenu_MenuActivate);
@@ -2402,7 +2403,8 @@
// N64SubMenu
//
this.N64SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.N64PluginSettingsMenuItem});
+ this.N64PluginSettingsMenuItem,
+ this.controllerSettingsToolStripMenuItem});
this.N64SubMenu.Name = "N64SubMenu";
this.N64SubMenu.Size = new System.Drawing.Size(40, 19);
this.N64SubMenu.Text = "N64";
@@ -2411,8 +2413,8 @@
//
this.N64PluginSettingsMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("N64PluginSettingsMenuItem.Image")));
this.N64PluginSettingsMenuItem.Name = "N64PluginSettingsMenuItem";
- this.N64PluginSettingsMenuItem.Size = new System.Drawing.Size(186, 22);
- this.N64PluginSettingsMenuItem.Text = "Video Plugin Settings";
+ this.N64PluginSettingsMenuItem.Size = new System.Drawing.Size(195, 22);
+ this.N64PluginSettingsMenuItem.Text = "Video Plugin Settings...";
this.N64PluginSettingsMenuItem.Click += new System.EventHandler(this.N64PluginSettingsMenuItem_Click);
//
// SaturnSubMenu
@@ -2970,6 +2972,13 @@
this.toolStripMenuItem15.Text = "File Extensions...";
this.toolStripMenuItem15.Click += new System.EventHandler(this.extensionsToolStripMenuItem_Click);
//
+ // customizeToolStripMenuItem
+ //
+ this.customizeToolStripMenuItem.Name = "customizeToolStripMenuItem";
+ this.customizeToolStripMenuItem.Size = new System.Drawing.Size(159, 22);
+ this.customizeToolStripMenuItem.Text = "Customize...";
+ this.customizeToolStripMenuItem.Click += new System.EventHandler(this.guiOptionsToolStripMenuItem_Click);
+ //
// toolStripSeparator30
//
this.toolStripSeparator30.Name = "toolStripSeparator30";
@@ -3087,12 +3096,13 @@
this.ShowMenuContextMenuItem.Text = "Show Menu";
this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click);
//
- // customizeToolStripMenuItem
+ // controllerSettingsToolStripMenuItem
//
- this.customizeToolStripMenuItem.Name = "customizeToolStripMenuItem";
- this.customizeToolStripMenuItem.Size = new System.Drawing.Size(159, 22);
- this.customizeToolStripMenuItem.Text = "Customize...";
- this.customizeToolStripMenuItem.Click += new System.EventHandler(this.guiOptionsToolStripMenuItem_Click);
+ this.controllerSettingsToolStripMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.GameController;
+ this.controllerSettingsToolStripMenuItem.Name = "controllerSettingsToolStripMenuItem";
+ this.controllerSettingsToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
+ this.controllerSettingsToolStripMenuItem.Text = "Controller Settings...";
+ this.controllerSettingsToolStripMenuItem.Click += new System.EventHandler(this.ControllerSettingsMenuItem_Click);
//
// MainForm
//
@@ -3459,6 +3469,7 @@
private System.Windows.Forms.ToolStripMenuItem N64VideoPluginSettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem ClientOptionsMenuItem;
private System.Windows.Forms.ToolStripMenuItem customizeToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem controllerSettingsToolStripMenuItem;
}
}
diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs
index 5cf37693f0..7c530a02a6 100644
--- a/BizHawk.Client.EmuHawk/MainForm.cs
+++ b/BizHawk.Client.EmuHawk/MainForm.cs
@@ -3297,5 +3297,10 @@ namespace BizHawk.Client.EmuHawk
{
new EmuHawkOptions().ShowDialog();
}
+
+ private void ControllerSettingsMenuItem_Click(object sender, EventArgs e)
+ {
+ new N64ControllersSetup().ShowDialog();
+ }
}
}
diff --git a/BizHawk.Client.EmuHawk/config/N64/N64ControllerSettingControl.Designer.cs b/BizHawk.Client.EmuHawk/config/N64/N64ControllerSettingControl.Designer.cs
new file mode 100644
index 0000000000..6ccb33edb2
--- /dev/null
+++ b/BizHawk.Client.EmuHawk/config/N64/N64ControllerSettingControl.Designer.cs
@@ -0,0 +1,90 @@
+namespace BizHawk.Client.EmuHawk
+{
+ partial class N64ControllerSettingControl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.EnabledCheckbox = new System.Windows.Forms.CheckBox();
+ this.PakTypeDropdown = new System.Windows.Forms.ComboBox();
+ this.ControllerNameLabel = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // EnabledCheckbox
+ //
+ this.EnabledCheckbox.AutoSize = true;
+ this.EnabledCheckbox.Location = new System.Drawing.Point(80, 2);
+ this.EnabledCheckbox.Name = "EnabledCheckbox";
+ this.EnabledCheckbox.Size = new System.Drawing.Size(78, 17);
+ this.EnabledCheckbox.TabIndex = 0;
+ this.EnabledCheckbox.Text = "Connected";
+ this.EnabledCheckbox.UseVisualStyleBackColor = true;
+ //
+ // PakTypeDropdown
+ //
+ this.PakTypeDropdown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.PakTypeDropdown.FormattingEnabled = true;
+ this.PakTypeDropdown.Items.AddRange(new object[] {
+ "None",
+ "Memory Card",
+ "Rumble Pak",
+ "Transfer Pak"});
+ this.PakTypeDropdown.Location = new System.Drawing.Point(160, 0);
+ this.PakTypeDropdown.Name = "PakTypeDropdown";
+ this.PakTypeDropdown.Size = new System.Drawing.Size(121, 21);
+ this.PakTypeDropdown.TabIndex = 1;
+ //
+ // ControllerNameLabel
+ //
+ this.ControllerNameLabel.AutoSize = true;
+ this.ControllerNameLabel.Location = new System.Drawing.Point(3, 4);
+ this.ControllerNameLabel.Name = "ControllerNameLabel";
+ this.ControllerNameLabel.Size = new System.Drawing.Size(60, 13);
+ this.ControllerNameLabel.TabIndex = 2;
+ this.ControllerNameLabel.Text = "Controller 1";
+ //
+ // N64ControllerSettingControl
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.ControllerNameLabel);
+ this.Controls.Add(this.PakTypeDropdown);
+ this.Controls.Add(this.EnabledCheckbox);
+ this.Name = "N64ControllerSettingControl";
+ this.Size = new System.Drawing.Size(290, 22);
+ this.Load += new System.EventHandler(this.N64ControllerSettingControl_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.CheckBox EnabledCheckbox;
+ private System.Windows.Forms.ComboBox PakTypeDropdown;
+ private System.Windows.Forms.Label ControllerNameLabel;
+ }
+}
diff --git a/BizHawk.Client.EmuHawk/config/N64/N64ControllerSettingControl.cs b/BizHawk.Client.EmuHawk/config/N64/N64ControllerSettingControl.cs
new file mode 100644
index 0000000000..53e0638d45
--- /dev/null
+++ b/BizHawk.Client.EmuHawk/config/N64/N64ControllerSettingControl.cs
@@ -0,0 +1,82 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using BizHawk.Emulation.Cores.Consoles.Nintendo.N64;
+using BizHawk.Common;
+
+namespace BizHawk.Client.EmuHawk
+{
+ public partial class N64ControllerSettingControl : UserControl
+ {
+ private int _controllerNumber = 1;
+
+ public N64ControllerSettingControl()
+ {
+ InitializeComponent();
+
+ ControllerNameLabel.Text = "Controller " + ControllerNumber;
+ }
+
+ private void N64ControllerSettingControl_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ public int ControllerNumber
+ {
+ get
+ {
+ return _controllerNumber;
+ }
+ set
+ {
+ _controllerNumber = value;
+ Refresh();
+ }
+ }
+
+ public bool IsConnected
+ {
+ get
+ {
+ return EnabledCheckbox.Checked;
+ }
+
+ set
+ {
+ EnabledCheckbox.Checked = value;
+ Refresh();
+ }
+ }
+
+ public N64ControllerSettings.N64ControllerPakType PakType
+ {
+ get
+ {
+ return EnumHelper.GetValueFromDescription(
+ PakTypeDropdown.SelectedItem.ToString());
+ }
+
+ set
+ {
+ var toSelect = PakTypeDropdown.Items
+ .OfType