From fb1d5072205a868127e966875ce7da1ccf173989 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Fri, 9 Apr 2021 13:58:07 +1000 Subject: [PATCH] Clean up use of existing CoreNames consts --- .../MainForm.Designer.cs | 4 +-- src/BizHawk.Client.EmuHawk/tools/GameShark.cs | 6 +++- .../Consoles/Nintendo/Faust/Faust.cs | 2 +- .../Nintendo/GBHawkLink/GBHawkLink.cs | 2 +- .../Consoles/Nintendo/Gameboy/GambatteLink.cs | 2 +- src/BizHawk.Emulation.Cores/CoreNames.cs | 30 +++++++++---------- 6 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs b/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs index 2be8134ba7..bc82110701 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs @@ -949,7 +949,7 @@ namespace BizHawk.Client.EmuHawk // LoadedCoreNameMenuItem // this.LoadedCoreNameMenuItem.Enabled = false; - this.LoadedCoreNameMenuItem.Text = "Loaded core: NullHawk (NULL)"; + this.LoadedCoreNameMenuItem.Text = "Loaded core: (sysID)"; // // ViewSubMenu // @@ -2164,7 +2164,7 @@ namespace BizHawk.Client.EmuHawk // // CoreNameStatusBarButton // - this.CoreNameStatusBarButton.Text = "Neshawk"; + this.CoreNameStatusBarButton.Text = ""; // // ProfileFirstBootLabel // diff --git a/src/BizHawk.Client.EmuHawk/tools/GameShark.cs b/src/BizHawk.Client.EmuHawk/tools/GameShark.cs index 84955837f7..45846c60ae 100644 --- a/src/BizHawk.Client.EmuHawk/tools/GameShark.cs +++ b/src/BizHawk.Client.EmuHawk/tools/GameShark.cs @@ -3,6 +3,7 @@ using BizHawk.Emulation.Common; using BizHawk.Client.Common; using BizHawk.Client.Common.cheats; +using BizHawk.Emulation.Cores; // TODO: // Add Support/Handling for The Following Systems and Devices: @@ -11,7 +12,10 @@ using BizHawk.Client.Common.cheats; // SNES: GoldFinger (Action Replay II) Support? namespace BizHawk.Client.EmuHawk { - [Tool(true, new[] { "GB", "GBA", "GEN", "N64", "NES", "PSX", "SAT", "SMS", "SNES" }, new[] { "Snes9x" })] + [Tool( + released: true, + supportedSystems: new[] { "GB", "GBA", "GEN", "N64", "NES", "PSX", "SAT", "SMS", "SNES" }, + unsupportedCores: new[] { CoreNames.Snes9X })] public partial class GameShark : ToolFormBase, IToolFormAutoConfig { [RequiredService] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs index e52e00534c..1368255f96 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs @@ -4,7 +4,7 @@ using BizHawk.Emulation.Cores.Waterbox; namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Faust { - [Core("Faust", "Mednafen Team", true, true, "1.26.1", "https://mednafen.github.io/releases/", false)] + [Core(CoreNames.Faust, "Mednafen Team", true, true, "1.26.1", "https://mednafen.github.io/releases/", false)] public class Faust : NymaCore, IRegionable { [CoreConstructor("SNES")] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.cs index 8a298ed9ae..4602505ade 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.cs @@ -3,7 +3,7 @@ using BizHawk.Emulation.Common; namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink { - [Core("GBHawkLink", "", isPorted: false, isReleased: true)] + [Core(CoreNames.GBHawkLink, "", isPorted: false, isReleased: true)] [ServiceNotApplicable(new[] { typeof(IDriveLight) })] public partial class GBHawkLink : IEmulator, ISaveRam, IDebuggable, IStatable, IInputPollable, IRegionable, ILinkable, ISettable diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs index dade985736..5834677edc 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs @@ -4,7 +4,7 @@ using BizHawk.Emulation.Common; namespace BizHawk.Emulation.Cores.Nintendo.Gameboy { [Core( - "DualGambatte", + CoreNames.DualGambatte, "sinamas/natt", isPorted: true, isReleased: true)] diff --git a/src/BizHawk.Emulation.Cores/CoreNames.cs b/src/BizHawk.Emulation.Cores/CoreNames.cs index 2e17ced300..3bab7294cb 100644 --- a/src/BizHawk.Emulation.Cores/CoreNames.cs +++ b/src/BizHawk.Emulation.Cores/CoreNames.cs @@ -8,23 +8,23 @@ namespace BizHawk.Emulation.Cores /// public static class CoreNames { - public const string NesHawk = "NesHawk"; - public const string SubNesHawk = "SubNESHawk"; - public const string QuickNes = "QuickNes"; - public const string Snes9X = "Snes9x"; public const string Bsnes = "BSNES"; - public const string Mgba = "mGBA"; - public const string GbHawk = "GBHawk"; - public const string Gambatte = "Gambatte"; - public const string SubGbHawk = "SubGBHawk"; - public const string SameBoy = "SameBoy"; - public const string PicoDrive = "PicoDrive"; - public const string Gpgx = "Genplus-gx"; - public const string PceHawk = "PCEHawk"; - public const string TurboNyma = "TurboNyma"; - public const string HyperNyma = "HyperNyma"; - public const string Faust = "Faust"; public const string DualGambatte = "DualGambatte"; + public const string Faust = "Faust"; + public const string Gambatte = "Gambatte"; + public const string GbHawk = "GBHawk"; public const string GBHawkLink = "GBHawkLink"; + public const string Gpgx = "Genplus-gx"; + public const string HyperNyma = "HyperNyma"; + public const string Mgba = "mGBA"; + public const string NesHawk = "NesHawk"; + public const string PceHawk = "PCEHawk"; + public const string PicoDrive = "PicoDrive"; + public const string QuickNes = "QuickNes"; + public const string SameBoy = "SameBoy"; + public const string Snes9X = "Snes9x"; + public const string SubGbHawk = "SubGBHawk"; + public const string SubNesHawk = "SubNESHawk"; + public const string TurboNyma = "TurboNyma"; } }