diff --git a/BizHawk.Client.EmuHawk/MainForm.Events.cs b/BizHawk.Client.EmuHawk/MainForm.Events.cs index d882af9442..87f78aaa9d 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -1097,7 +1097,13 @@ namespace BizHawk.Client.EmuHawk VirtualPadMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Virtual Pad"].Bindings; TraceLoggerMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Trace Logger"].Bindings; TraceLoggerMenuItem.Enabled = Global.Emulator.CoreComm.CpuTraceAvailable; - CheatsMenuItem.Enabled = !(Global.Emulator is NullEmulator); + CheatsMenuItem.Enabled = + HexEditorMenuItem.Enabled = + RamSearchMenuItem.Enabled = + RamWatchMenuItem.Enabled = + TAStudioMenuItem.Enabled = + VirtualPadMenuItem.Enabled = + !(Global.Emulator is NullEmulator); } private void ToolBoxMenuItem_Click(object sender, EventArgs e) diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 7aaf5e9b05..cc43098f07 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -45,7 +45,7 @@ namespace BizHawk.Client.EmuHawk PlayRecordStatusButton.Visible = false; AVIStatusLabel.Visible = false; SetPauseStatusbarIcon(); - UpdateCheatStatus(); + ToolHelpers.UpdateCheatRelatedTools(null, null); RebootStatusBarIcon.Visible = false; } @@ -3657,7 +3657,7 @@ namespace BizHawk.Client.EmuHawk Global.AutofireStickyXORAdapter.ClearStickies(); RewireSound(); - + ToolHelpers.UpdateCheatRelatedTools(null, null); return true; } } diff --git a/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs b/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs index 737a895473..8686f80964 100644 --- a/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs +++ b/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs @@ -780,22 +780,13 @@ namespace BizHawk.Client.EmuHawk { // TODO: can't unfreeze address 0?? Global.CheatList.RemoveRange( - Global.CheatList.Where(x => x.Contains(address)) + Global.CheatList.Where(x => x.Contains(address)).ToList() ); } MemoryViewerBox.Refresh(); } - private void UpdateRelatedDialogs() - { - GlobalWin.Tools.UpdateValues(); - GlobalWin.Tools.UpdateValues(); - GlobalWin.Tools.UpdateValues(); - GlobalWin.MainForm.UpdateCheatStatus(); - UpdateValues(); - } - // TODO refactor to int? private void FreezeAddress(int address) { @@ -813,8 +804,7 @@ namespace BizHawk.Client.EmuHawk watch, watch.Value ?? 0)); - MemoryViewerBox.Refresh(); - UpdateRelatedDialogs(); + ToolHelpers.UpdateCheatRelatedTools(null, null); } } @@ -1446,7 +1436,7 @@ namespace BizHawk.Client.EmuHawk } } - UpdateRelatedDialogs(); + ToolHelpers.UpdateCheatRelatedTools(null, null); } private void UnfreezeAllMenuItem_Click(object sender, EventArgs e)