From 31bf9b9147b1f44fea56d358529d7eda638c762d Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 9 Aug 2020 15:29:41 -0500 Subject: [PATCH] hack rom loader to keep doing the bullshit we've been doing for 8 years now, where Game.System == "GBC" results in an Emulator with a SystemID. Don't revert without volunteering to fix tasvideos --- src/BizHawk.Client.Common/RomLoader.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/BizHawk.Client.Common/RomLoader.cs b/src/BizHawk.Client.Common/RomLoader.cs index 09a648a51d..c890c98bad 100644 --- a/src/BizHawk.Client.Common/RomLoader.cs +++ b/src/BizHawk.Client.Common/RomLoader.cs @@ -333,7 +333,23 @@ namespace BizHawk.Client.Common private IEmulator MakeCoreFromCoreInventory(CoreInventoryParameters cip) { - _config.PreferredCores.TryGetValue(cip.Game.System, out var preferredCore); + var preferredSystem = cip.Game.System; + if (preferredSystem == "GBC") + { + preferredSystem = "GB"; + } + + if (preferredSystem.In("GG", "SG")) + { + preferredSystem = "SMS"; + } + + if (preferredSystem == "SGX") + { + preferredSystem = "PCE"; + } + + _config.PreferredCores.TryGetValue(preferredSystem, out var preferredCore); var forcedCore = cip.Game.ForcedCore; var cores = CoreInventory.Instance.GetCores(cip.Game.System) .OrderBy(c =>