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

View File

@ -10,7 +10,7 @@ using System.Linq;
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)]
public class Sameboy : WaterboxCore,
IGameboyCommon, ISaveRam,

View File

@ -9,7 +9,7 @@ using System.ComponentModel;
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)]
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)
{ }
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)
: base(comm, new Configuration
{

View File

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

View File

@ -18,5 +18,8 @@ namespace BizHawk.Emulation.Cores
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";
}
}