convert some more core name strings to constants

This commit is contained in:
adelikat 2020-05-16 14:51:47 -05:00
parent 3808a6d88f
commit de97abf6e5
5 changed files with 11 additions and 12 deletions

View File

@ -891,7 +891,7 @@ namespace BizHawk.Client.Common
if (useSnes9x) if (useSnes9x)
{ {
core = CoreInventory.Instance["SNES", "Snes9x"]; core = CoreInventory.Instance["SNES", CoreNames.Snes9X];
} }
else else
{ {
@ -946,7 +946,7 @@ namespace BizHawk.Client.Common
} }
else else
{ {
core = CoreInventory.Instance["SGB", "SameBoy"]; core = CoreInventory.Instance["SGB", CoreNames.SameBoy];
} }
} }
break; break;
@ -980,16 +980,16 @@ namespace BizHawk.Client.Common
case "GEN": case "GEN":
if (Global.Config.CoreForcingViaGameDb && game.ForcedCore?.ToLower() == "pico") if (Global.Config.CoreForcingViaGameDb && game.ForcedCore?.ToLower() == "pico")
{ {
core = CoreInventory.Instance["GEN", "PicoDrive"]; core = CoreInventory.Instance["GEN", CoreNames.PicoDrive];
} }
else else
{ {
core = CoreInventory.Instance["GEN", "Genplus-gx"]; core = CoreInventory.Instance["GEN", CoreNames.Gpgx];
} }
break; break;
case "32X": case "32X":
core = CoreInventory.Instance["GEN", "PicoDrive"]; core = CoreInventory.Instance["GEN", CoreNames.PicoDrive];
break; break;
} }

View File

@ -10,7 +10,7 @@ using System.Linq;
namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy
{ {
[Core("SameBoy", "LIJI32", true, true, "efc11783c7fb6da66e1dd084e41ba6a85c0bd17e", [Core(CoreNames.SameBoy, "LIJI32", true, true, "efc11783c7fb6da66e1dd084e41ba6a85c0bd17e",
"https://sameboy.github.io/", false)] "https://sameboy.github.io/", false)]
public class Sameboy : WaterboxCore, public class Sameboy : WaterboxCore,
IGameboyCommon, ISaveRam, IGameboyCommon, ISaveRam,

View File

@ -9,7 +9,7 @@ using System.ComponentModel;
namespace BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive namespace BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive
{ {
[Core("PicoDrive", "notaz", true, true, [Core(CoreNames.PicoDrive, "notaz", true, true,
"0e352905c7aa80b166933970abbcecfce96ad64e", "https://github.com/notaz/picodrive", false)] "0e352905c7aa80b166933970abbcecfce96ad64e", "https://github.com/notaz/picodrive", false)]
public class PicoDrive : WaterboxCore, IDriveLight, IRegionable, ISettable<object, PicoDrive.SyncSettings> public class PicoDrive : WaterboxCore, IDriveLight, IRegionable, ISettable<object, PicoDrive.SyncSettings>
{ {
@ -24,10 +24,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive
: this(comm, game, rom, null, deterministic, syncSettings) : this(comm, game, rom, null, deterministic, syncSettings)
{ } { }
public PicoDrive(CoreComm comm, GameInfo game, Disc cd, bool deterministic, SyncSettings syncSettings)
: this(comm, game, null, cd, deterministic, syncSettings)
{ }
private PicoDrive(CoreComm comm, GameInfo game, byte[] rom, Disc cd, bool deterministic, SyncSettings syncSettings) private PicoDrive(CoreComm comm, GameInfo game, byte[] rom, Disc cd, bool deterministic, SyncSettings syncSettings)
: base(comm, new Configuration : base(comm, new Configuration
{ {

View File

@ -12,7 +12,7 @@ using System.Linq;
namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
{ {
[Core( [Core(
"Genplus-gx", CoreNames.Gpgx,
"", "",
isPorted: true, isPorted: true,
isReleased: true, isReleased: true,

View File

@ -18,5 +18,8 @@ namespace BizHawk.Emulation.Cores
public const string GbHawk = "GBHawk"; public const string GbHawk = "GBHawk";
public const string Gambatte = "Gambatte"; public const string Gambatte = "Gambatte";
public const string SubGbHawk = "SubGBHawk"; public const string SubGbHawk = "SubGBHawk";
public const string SameBoy = "SameBoy";
public const string PicoDrive = "PicoDrive";
public const string Gpgx = "Genplus-gx";
} }
} }