From 82be039bf726837a50b8b6f5f10ecb8f86775fd1 Mon Sep 17 00:00:00 2001 From: beirich Date: Tue, 15 Feb 2011 03:05:25 +0000 Subject: [PATCH] fix bug in SMS FM chip toggle ui code --- BizHawk.MultiClient/MainForm.Designer.cs | 1 - BizHawk.MultiClient/MainForm.cs | 35 ++++-------------------- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/BizHawk.MultiClient/MainForm.Designer.cs b/BizHawk.MultiClient/MainForm.Designer.cs index 62868f944f..51212a51df 100644 --- a/BizHawk.MultiClient/MainForm.Designer.cs +++ b/BizHawk.MultiClient/MainForm.Designer.cs @@ -928,7 +928,6 @@ this.MaximizeBox = false; this.Name = "MainForm"; this.Text = "BizHawk"; - this.Load += new System.EventHandler(this.MainForm_Load); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); this.ResumeLayout(false); diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 4ee2bd7bd7..502f896588 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -681,29 +681,12 @@ namespace BizHawk.MultiClient private void emulationToolStripMenuItem_DropDownOpened(object sender, EventArgs e) { - if (IsNullEmulator()) - { - powerToolStripMenuItem.Enabled = false; - } - else - { - powerToolStripMenuItem.Enabled = true; - } + powerToolStripMenuItem.Enabled = !IsNullEmulator(); + resetToolStripMenuItem.Enabled = Global.Emulator.ControllerDefinition.BoolButtons.Contains("Reset"); - if (Global.Emulator.ControllerDefinition.BoolButtons.Contains("Reset")) - resetToolStripMenuItem.Enabled = true; - else - resetToolStripMenuItem.Enabled = false; - - if (Global.Config.SmsAllowOverlock) - overclockWhenKnownSafeToolStripMenuItem.Checked = true; - else - overclockWhenKnownSafeToolStripMenuItem.Checked = false; - - if (Global.Config.SmsForceStereoSeparation) - forceStereoSeparationToolStripMenuItem.Checked = true; - else - forceStereoSeparationToolStripMenuItem.Checked = false; + enableFMChipToolStripMenuItem.Checked = Global.Config.SmsEnableFM; + overclockWhenKnownSafeToolStripMenuItem.Checked = Global.Config.SmsAllowOverlock; + forceStereoSeparationToolStripMenuItem.Checked = Global.Config.SmsForceStereoSeparation; } private void clearToolStripMenuItem_Click(object sender, EventArgs e) @@ -856,14 +839,6 @@ namespace BizHawk.MultiClient LoadRamWatch(); } - private void MainForm_Load(object sender, EventArgs e) - { - if (Global.Config.SmsEnableFM) - enableFMChipToolStripMenuItem.Checked = true; - else - enableFMChipToolStripMenuItem.Checked = false; - } - private void rAMSearchToolStripMenuItem_Click(object sender, EventArgs e) { LoadRamSearch();