Refactor 32x loading

less code is good good
This commit is contained in:
nattthebear 2020-07-11 20:38:09 -04:00
parent 502aef73a0
commit 467f0aff2b
2 changed files with 7 additions and 7 deletions

View File

@ -568,9 +568,6 @@ namespace BizHawk.Client.Common
case "GEN":
core = CoreInventory.Instance["GEN", game.ForcedCore?.ToLower() == "pico" ? CoreNames.PicoDrive : CoreNames.Gpgx];
break;
case "32X":
core = CoreInventory.Instance["GEN", CoreNames.PicoDrive];
break;
default:
core = _config.PreferredCores.TryGetValue(game.System, out var coreName)
? CoreInventory.Instance[game.System, coreName]
@ -916,7 +913,8 @@ namespace BizHawk.Client.Common
LoadM3U(path, nextComm, file, out nextEmulator, out game);
break;
case ".xml":
if (!LoadXML(path, nextComm, file, out nextEmulator, out rom, out game)) return false;
if (!LoadXML(path, nextComm, file, out nextEmulator, out rom, out game))
return false;
break;
case ".psf":
case ".minipsf":
@ -925,8 +923,10 @@ namespace BizHawk.Client.Common
default:
if (Disc.IsValidExtension(ext))
{
if (file.IsArchive) throw new InvalidOperationException("Can't load CD files from archives!");
if (!LoadDisc(path, nextComm, file, ext, out nextEmulator, out game)) return false;
if (file.IsArchive)
throw new InvalidOperationException("Can't load CD files from archives!");
if (!LoadDisc(path, nextComm, file, ext, out nextEmulator, out game))
return false;
}
else
{

View File

@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive
private DiscSectorReader _cdReader;
private bool _isPal;
[CoreConstructor("GEN")]
[CoreConstructor(new[] { "GEN", "32X" })]
public PicoDrive(CoreComm comm, GameInfo game, byte[] rom, bool deterministic, SyncSettings syncSettings)
: this(comm, game, rom, null, deterministic, syncSettings)
{ }