NES - Rip out controller settings stuff from Advanced movie settings

This commit is contained in:
adelikat 2014-05-16 00:53:10 +00:00
parent 0471ec197f
commit cffa2dd6dc
3 changed files with 61 additions and 210 deletions

View File

@ -198,6 +198,7 @@
this.NESNametableViewerMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.NESGameGenieCodesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator17 = new System.Windows.Forms.ToolStripSeparator();
this.NesControllerSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MovieSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.NESGraphicSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.NESSoundChannelsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -352,7 +353,7 @@
this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.NesControllerSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator22 = new System.Windows.Forms.ToolStripSeparator();
this.MainformMenu.SuspendLayout();
this.MainStatusBar.SuspendLayout();
this.MainFormContextMenu.SuspendLayout();
@ -384,7 +385,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, 61);
this.MainformMenu.Size = new System.Drawing.Size(470, 42);
this.MainformMenu.TabIndex = 0;
this.MainformMenu.Text = "menuStrip1";
this.MainformMenu.MenuActivate += new System.EventHandler(this.MainformMenu_MenuActivate);
@ -1784,9 +1785,10 @@
this.NESGameGenieCodesMenuItem,
this.toolStripSeparator17,
this.NesControllerSettingsMenuItem,
this.MovieSettingsMenuItem,
this.NESGraphicSettingsMenuItem,
this.NESSoundChannelsMenuItem,
this.MovieSettingsMenuItem,
this.toolStripSeparator22,
this.FDSControlsMenuItem});
this.NESSubMenu.Name = "NESSubMenu";
this.NESSubMenu.Size = new System.Drawing.Size(40, 19);
@ -1827,6 +1829,14 @@
this.toolStripSeparator17.Name = "toolStripSeparator17";
this.toolStripSeparator17.Size = new System.Drawing.Size(230, 6);
//
// NesControllerSettingsMenuItem
//
this.NesControllerSettingsMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.GameController;
this.NesControllerSettingsMenuItem.Name = "NesControllerSettingsMenuItem";
this.NesControllerSettingsMenuItem.Size = new System.Drawing.Size(233, 22);
this.NesControllerSettingsMenuItem.Text = "Controller Settings...";
this.NesControllerSettingsMenuItem.Click += new System.EventHandler(this.NesControllerSettingsMenuItem_Click);
//
// MovieSettingsMenuItem
//
this.MovieSettingsMenuItem.Name = "MovieSettingsMenuItem";
@ -1862,7 +1872,7 @@
// FdsEjectDiskMenuItem
//
this.FdsEjectDiskMenuItem.Name = "FdsEjectDiskMenuItem";
this.FdsEjectDiskMenuItem.Size = new System.Drawing.Size(152, 22);
this.FdsEjectDiskMenuItem.Size = new System.Drawing.Size(124, 22);
this.FdsEjectDiskMenuItem.Text = "&Eject Disk";
this.FdsEjectDiskMenuItem.Click += new System.EventHandler(this.FdsEjectDiskMenuItem_Click);
//
@ -3081,13 +3091,10 @@
this.ShowMenuContextMenuItem.Text = "Show Menu";
this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click);
//
// NesControllerSettingsMenuItem
// toolStripSeparator22
//
this.NesControllerSettingsMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.GameController;
this.NesControllerSettingsMenuItem.Name = "NesControllerSettingsMenuItem";
this.NesControllerSettingsMenuItem.Size = new System.Drawing.Size(233, 22);
this.NesControllerSettingsMenuItem.Text = "Controller Settings...";
this.NesControllerSettingsMenuItem.Click += new System.EventHandler(this.NesControllerSettingsMenuItem_Click);
this.toolStripSeparator22.Name = "toolStripSeparator22";
this.toolStripSeparator22.Size = new System.Drawing.Size(230, 6);
//
// MainForm
//
@ -3453,6 +3460,7 @@
private System.Windows.Forms.ToolStripMenuItem N64ControllerSettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem GBcoreSettingsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem NesControllerSettingsMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator22;
}
}

View File

@ -30,31 +30,19 @@
{
this.OkBtn = new System.Windows.Forms.Button();
this.CancelBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.HelpBtn = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.comboBoxNESR = new System.Windows.Forms.ComboBox();
this.comboBoxNESL = new System.Windows.Forms.ComboBox();
this.comboBoxFamicom = new System.Windows.Forms.ComboBox();
this.checkBoxFamicom = new System.Windows.Forms.CheckBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// OkBtn
//
this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.OkBtn.Location = new System.Drawing.Point(221, 402);
this.OkBtn.Location = new System.Drawing.Point(221, 341);
this.OkBtn.Name = "OkBtn";
this.OkBtn.Size = new System.Drawing.Size(67, 23);
this.OkBtn.TabIndex = 0;
@ -66,7 +54,7 @@
//
this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelBtn.Location = new System.Drawing.Point(294, 402);
this.CancelBtn.Location = new System.Drawing.Point(294, 341);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(67, 23);
this.CancelBtn.TabIndex = 1;
@ -74,176 +62,71 @@
this.CancelBtn.UseVisualStyleBackColor = true;
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(6, 3);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(88, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Board Properties:";
//
// dataGridView1
//
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(6, 19);
this.dataGridView1.Location = new System.Drawing.Point(10, 19);
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.Size = new System.Drawing.Size(329, 284);
this.dataGridView1.TabIndex = 3;
this.dataGridView1.Size = new System.Drawing.Size(333, 203);
this.dataGridView1.TabIndex = 9;
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(12, 26);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(235, 21);
this.comboBox1.TabIndex = 11;
//
// HelpBtn
//
this.HelpBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.HelpBtn.Location = new System.Drawing.Point(6, 309);
this.HelpBtn.Location = new System.Drawing.Point(12, 67);
this.HelpBtn.Name = "HelpBtn";
this.HelpBtn.Size = new System.Drawing.Size(23, 23);
this.HelpBtn.TabIndex = 4;
this.HelpBtn.TabIndex = 10;
this.HelpBtn.Text = "?";
this.HelpBtn.UseVisualStyleBackColor = true;
this.HelpBtn.Click += new System.EventHandler(this.HelpBtn_Click);
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(6, 334);
this.label2.Location = new System.Drawing.Point(9, 10);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 13);
this.label2.TabIndex = 5;
this.label2.Text = "Region:";
this.label2.Size = new System.Drawing.Size(87, 13);
this.label2.TabIndex = 12;
this.label2.Text = "Region Override:";
//
// comboBox1
// groupBox1
//
this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(57, 331);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(278, 21);
this.comboBox1.TabIndex = 6;
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(12, 12);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(349, 384);
this.tabControl1.TabIndex = 7;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.label5);
this.tabPage1.Controls.Add(this.label4);
this.tabPage1.Controls.Add(this.label3);
this.tabPage1.Controls.Add(this.comboBoxNESR);
this.tabPage1.Controls.Add(this.comboBoxNESL);
this.tabPage1.Controls.Add(this.comboBoxFamicom);
this.tabPage1.Controls.Add(this.checkBoxFamicom);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(341, 358);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Controls";
this.tabPage1.UseVisualStyleBackColor = true;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(3, 136);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(82, 13);
this.label5.TabIndex = 6;
this.label5.Text = "NES Right Port:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(6, 96);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(75, 13);
this.label4.TabIndex = 5;
this.label4.Text = "NES Left Port:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 56);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(104, 13);
this.label3.TabIndex = 4;
this.label3.Text = "Famicom Expansion:";
//
// comboBoxNESR
//
this.comboBoxNESR.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxNESR.FormattingEnabled = true;
this.comboBoxNESR.Location = new System.Drawing.Point(6, 152);
this.comboBoxNESR.Name = "comboBoxNESR";
this.comboBoxNESR.Size = new System.Drawing.Size(329, 21);
this.comboBoxNESR.TabIndex = 3;
//
// comboBoxNESL
//
this.comboBoxNESL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxNESL.FormattingEnabled = true;
this.comboBoxNESL.Location = new System.Drawing.Point(6, 112);
this.comboBoxNESL.Name = "comboBoxNESL";
this.comboBoxNESL.Size = new System.Drawing.Size(329, 21);
this.comboBoxNESL.TabIndex = 2;
//
// comboBoxFamicom
//
this.comboBoxFamicom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxFamicom.Enabled = false;
this.comboBoxFamicom.FormattingEnabled = true;
this.comboBoxFamicom.Location = new System.Drawing.Point(6, 72);
this.comboBoxFamicom.Name = "comboBoxFamicom";
this.comboBoxFamicom.Size = new System.Drawing.Size(329, 21);
this.comboBoxFamicom.TabIndex = 1;
//
// checkBoxFamicom
//
this.checkBoxFamicom.AutoSize = true;
this.checkBoxFamicom.Location = new System.Drawing.Point(6, 6);
this.checkBoxFamicom.Name = "checkBoxFamicom";
this.checkBoxFamicom.Size = new System.Drawing.Size(68, 17);
this.checkBoxFamicom.TabIndex = 0;
this.checkBoxFamicom.Text = "Famicom";
this.checkBoxFamicom.UseVisualStyleBackColor = true;
this.checkBoxFamicom.CheckedChanged += new System.EventHandler(this.checkBoxFamicom_CheckedChanged);
//
// tabPage2
//
this.tabPage2.Controls.Add(this.dataGridView1);
this.tabPage2.Controls.Add(this.label2);
this.tabPage2.Controls.Add(this.comboBox1);
this.tabPage2.Controls.Add(this.label1);
this.tabPage2.Controls.Add(this.HelpBtn);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(341, 358);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Misc";
this.tabPage2.UseVisualStyleBackColor = true;
this.groupBox1.Controls.Add(this.dataGridView1);
this.groupBox1.Location = new System.Drawing.Point(12, 96);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(349, 228);
this.groupBox1.TabIndex = 13;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Board Properties";
//
// NESSyncSettingsForm
//
this.AcceptButton = this.OkBtn;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(373, 437);
this.Controls.Add(this.tabControl1);
this.CancelButton = this.CancelBtn;
this.ClientSize = new System.Drawing.Size(373, 376);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.label2);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.HelpBtn);
this.Controls.Add(this.CancelBtn);
this.Controls.Add(this.OkBtn);
this.MinimumSize = new System.Drawing.Size(210, 150);
@ -252,12 +135,9 @@
this.Text = "NES Movie Settings";
this.Load += new System.EventHandler(this.NESSyncSettingsForm_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
@ -265,20 +145,10 @@
private System.Windows.Forms.Button OkBtn;
private System.Windows.Forms.Button CancelBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Button HelpBtn;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox comboBoxNESR;
private System.Windows.Forms.ComboBox comboBoxNESL;
private System.Windows.Forms.ComboBox comboBoxFamicom;
private System.Windows.Forms.CheckBox checkBoxFamicom;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.GroupBox groupBox1;
}
}

View File

@ -26,15 +26,6 @@ namespace BizHawk.Client.EmuHawk
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
comboBox1.Items.AddRange(Enum.GetNames(typeof(NES.NESSyncSettings.Region)));
comboBox1.SelectedItem = Enum.GetName(typeof(NES.NESSyncSettings.Region), SyncSettings.RegionOverride);
comboBoxFamicom.Items.AddRange(NESControlSettings.GetFamicomExpansionValues().ToArray());
comboBoxNESL.Items.AddRange(NESControlSettings.GetNesPortValues().ToArray());
comboBoxNESR.Items.AddRange(NESControlSettings.GetNesPortValues().ToArray());
comboBoxFamicom.SelectedItem = SyncSettings.Controls.FamicomExpPort;
comboBoxNESL.SelectedItem = SyncSettings.Controls.NesLeftPort;
comboBoxNESR.SelectedItem = SyncSettings.Controls.NesRightPort;
checkBoxFamicom.Checked = SyncSettings.Controls.Famicom;
}
private void CancelBtn_Click(object sender, EventArgs e)
@ -52,19 +43,8 @@ namespace BizHawk.Client.EmuHawk
typeof(BizHawk.Emulation.Cores.Nintendo.NES.NES.NESSyncSettings.Region),
(string)comboBox1.SelectedItem);
var ctrls = new NESControlSettings
{
Famicom = checkBoxFamicom.Checked,
FamicomExpPort = (string)comboBoxFamicom.SelectedItem,
NesLeftPort = (string)comboBoxNESL.SelectedItem,
NesRightPort = (string)comboBoxNESR.SelectedItem
};
bool changed = DTDB.WasModified ||
old != SyncSettings.RegionOverride ||
NESControlSettings.NeedsReboot(ctrls, SyncSettings.Controls);
SyncSettings.Controls = ctrls;
old != SyncSettings.RegionOverride;
DialogResult = DialogResult.OK;
if (changed)
@ -78,13 +58,6 @@ namespace BizHawk.Client.EmuHawk
MessageBox.Show(this, "Board Properties are special per-mapper system settings. They are only useful to advanced users creating Tool Assisted Superplays. No support will be provided if you break something with them.", "Help");
}
private void checkBoxFamicom_CheckedChanged(object sender, EventArgs e)
{
comboBoxFamicom.Enabled = checkBoxFamicom.Checked;
comboBoxNESL.Enabled = !checkBoxFamicom.Checked;
comboBoxNESR.Enabled = !checkBoxFamicom.Checked;
}
private void NESSyncSettingsForm_Load(object sender, EventArgs e)
{