diff --git a/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs b/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs index 666e508773..6e6df537e0 100644 --- a/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs +++ b/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs @@ -7,10 +7,6 @@ using System.Linq; using System.Windows.Forms; using BizHawk.Emulation.Common; -using BizHawk.Emulation.Common.IEmulatorExtensions; -using BizHawk.Emulation.Cores.Nintendo.SNES; -using BizHawk.Emulation.Cores.Sega.Genesis; - using BizHawk.Client.Common; using BizHawk.Client.EmuHawk.ToolExtensions; using BizHawk.Client.EmuHawk.WinFormExtensions; @@ -172,7 +168,7 @@ namespace BizHawk.Client.EmuHawk { GameGenieToolbarSeparator.Visible = LoadGameGenieToolbarItem.Visible = - GlobalWin.Tools.GameGenieAvailable; + GlobalWin.Tools.IsAvailable(); } private void AddCheat() @@ -443,7 +439,7 @@ namespace BizHawk.Client.EmuHawk GameGenieSeparator.Visible = OpenGameGenieEncoderDecoderMenuItem.Visible = - GlobalWin.Tools.GameGenieAvailable; + GlobalWin.Tools.IsAvailable(); } private void RemoveCheatMenuItem_Click(object sender, EventArgs e) diff --git a/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/BizHawk.Client.EmuHawk/tools/ToolManager.cs index 195fe65b2e..1a15873f24 100644 --- a/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -716,19 +716,6 @@ namespace BizHawk.Client.EmuHawk return true; } - // Eventually we want a single game genie tool, then this mess goes away - public bool GameGenieAvailable - { - get - { - return (Global.Emulator.SystemId == "NES") - || (Global.Emulator.SystemId == "GEN") - || (Global.Emulator.SystemId == "GB") - || (Global.Game.System == "GG") - || (Global.Emulator is BizHawk.Emulation.Cores.Nintendo.SNES.LibsnesCore); - } - } - // Note: Referencing these properties creates an instance of the tool and persists it. They should be referenced by type if this is not desired #region Tools @@ -943,21 +930,9 @@ namespace BizHawk.Client.EmuHawk public void LoadGameGenieEc() { - if (Global.Emulator.SystemId == "NES") + if (GlobalWin.Tools.IsAvailable()) { - Load(); - } - else if (Global.Emulator.SystemId == "SNES") - { - Load(); - } - else if ((Global.Emulator.SystemId == "GB") || (Global.Game.System == "GG")) - { - Load(); - } - else if (Global.Emulator.SystemId == "GEN") - { - Load(); + GlobalWin.Tools.Load(); } }