diff --git a/BizHawk.MultiClient/MainForm.Designer.cs b/BizHawk.MultiClient/MainForm.Designer.cs index 70f41a3003..337bb8121a 100644 --- a/BizHawk.MultiClient/MainForm.Designer.cs +++ b/BizHawk.MultiClient/MainForm.Designer.cs @@ -268,6 +268,7 @@ this.StatusSlot9 = new System.Windows.Forms.ToolStripStatusLabel(); this.StatusSlot10 = new System.Windows.Forms.ToolStripStatusLabel(); this.CheatStatus = new System.Windows.Forms.ToolStripStatusLabel(); + this.RebootStatusBarIcon = new System.Windows.Forms.ToolStripStatusLabel(); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmiOpenRom = new System.Windows.Forms.ToolStripMenuItem(); this.cmiLoadLastRom = new System.Windows.Forms.ToolStripMenuItem(); @@ -2164,6 +2165,7 @@ this.EmuStatus, this.PlayRecordStatus, this.PauseStrip, + this.RebootStatusBarIcon, this.AVIStatusLabel, this.toolStripStatusLabel1, this.StatusSlot1, @@ -2315,6 +2317,17 @@ this.CheatStatus.Size = new System.Drawing.Size(0, 17); this.CheatStatus.Click += new System.EventHandler(this.FreezeStatus_Click); // + // RebootStatusBarIcon + // + this.RebootStatusBarIcon.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.RebootStatusBarIcon.Image = global::BizHawk.MultiClient.Properties.Resources.reboot; + this.RebootStatusBarIcon.Name = "RebootStatusBarIcon"; + this.RebootStatusBarIcon.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.RebootStatusBarIcon.Size = new System.Drawing.Size(16, 17); + this.RebootStatusBarIcon.Text = "Reboot"; + this.RebootStatusBarIcon.ToolTipText = "A reboot of the core is needed for a setting change to take affect"; + this.RebootStatusBarIcon.Click += new System.EventHandler(this.toolStripStatusLabel2_Click); + // // contextMenuStrip1 // this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -2778,6 +2791,7 @@ private System.Windows.Forms.ToolStripMenuItem loadGBInSGBToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem loadGBInSGBToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem backupSaveramToolStripMenuItem; + private System.Windows.Forms.ToolStripStatusLabel RebootStatusBarIcon; } } diff --git a/BizHawk.MultiClient/MainForm.MenuItems.cs b/BizHawk.MultiClient/MainForm.MenuItems.cs index 8a83b67f8a..c29079845b 100644 --- a/BizHawk.MultiClient/MainForm.MenuItems.cs +++ b/BizHawk.MultiClient/MainForm.MenuItems.cs @@ -178,16 +178,19 @@ namespace BizHawk.MultiClient private void smsEnableFMChipToolStripMenuItem_Click(object sender, EventArgs e) { Global.Config.SmsEnableFM ^= true; + FlagNeedsReboot(); } private void smsOverclockWhenKnownSafeToolStripMenuItem_Click(object sender, EventArgs e) { Global.Config.SmsAllowOverlock ^= true; + FlagNeedsReboot(); } private void smsForceStereoSeparationToolStripMenuItem_Click(object sender, EventArgs e) { Global.Config.SmsForceStereoSeparation ^= true; + FlagNeedsReboot(); } private void smsSpriteLimitToolStripMenuItem_Click(object sender, EventArgs e) @@ -1910,16 +1913,19 @@ namespace BizHawk.MultiClient private void forceDMGModeToolStripMenuItem_Click(object sender, EventArgs e) { Global.Config.GB_ForceDMG ^= true; + FlagNeedsReboot(); } private void gBAInCGBModeToolStripMenuItem_Click(object sender, EventArgs e) { Global.Config.GB_GBACGB ^= true; + FlagNeedsReboot(); } private void multicartCompatibilityToolStripMenuItem_Click(object sender, EventArgs e) { Global.Config.GB_MulticartCompat ^= true; + FlagNeedsReboot(); } } } diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 3c3edfd217..4013b4a06e 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -37,7 +37,7 @@ namespace BizHawk.MultiClient public bool TurboFastForward = false; public bool RestoreReadWriteOnStop = false; public bool UpdateFrame = false; - + public bool NeedsReboot = false; //avi/wav state IVideoWriter CurrAviWriter = null; /// @@ -1676,6 +1676,8 @@ namespace BizHawk.MultiClient Global.ActiveController = Global.NullControls; Global.AutoFireController = Global.AutofireNullControls; Global.MovieSession.Movie.Stop(); + NeedsReboot = false; + SetRebootIconStatus(); } private static void SaveRam() @@ -3524,6 +3526,7 @@ namespace BizHawk.MultiClient AVIStatusLabel.Visible = false; SetPauseStatusbarIcon(); UpdateCheatStatus(); + SetRebootIconStatus(); } private void IncreaseWindowSize() @@ -3701,6 +3704,7 @@ namespace BizHawk.MultiClient private void loadGBInSGBToolStripMenuItem_Click(object sender, EventArgs e) { Global.Config.GB_AsSGB ^= true; + FlagNeedsReboot(); } private void MainForm_Resize(object sender, EventArgs e) @@ -3721,5 +3725,29 @@ namespace BizHawk.MultiClient } } + + private void toolStripStatusLabel2_Click(object sender, EventArgs e) + { + RebootCore(); + } + + private void SetRebootIconStatus() + { + if (NeedsReboot) + { + RebootStatusBarIcon.Visible = true; + } + else + { + RebootStatusBarIcon.Visible = false; + } + } + + private void FlagNeedsReboot() + { + NeedsReboot = true; + SetRebootIconStatus(); + Global.OSD.AddMessage("Core reboot needed for this setting"); + } } }