simplify movieSession core preference shenanigans

This commit is contained in:
adelikat 2020-04-17 15:49:41 -05:00
parent dfe7f8e3ab
commit 9928a88d2c
1 changed files with 10 additions and 18 deletions

View File

@ -251,25 +251,17 @@ namespace BizHawk.Client.Common
if (!record)
{
switch (emulator.SystemId)
var preference = emulator.SystemId;
if (preference == "GBC")
{
case "NES":
PreferredCores["NES"] = Global.Config.PreferredCores["NES"];
Global.Config.PreferredCores["NES"] = movie.Core;
break;
case "SNES":
PreferredCores["SNES"] = Global.Config.PreferredCores["SNES"];
Global.Config.PreferredCores["SNES"] = movie.Core;
break;
case "GBA":
PreferredCores["GBA"] = Global.Config.PreferredCores["GBA"];
Global.Config.PreferredCores["GBA"] = movie.Core;
break;
case "GB":
case "GBC":
PreferredCores["GB"] = Global.Config.PreferredCores["GB"];
Global.Config.PreferredCores["GB"] = movie.Core;
break;
// We want to treat GBC the same as GB
preference = "GB";
}
if (Global.Config.PreferredCores.ContainsKey(preference))
{
PreferredCores[preference] = Global.Config.PreferredCores[preference];
Global.Config.PreferredCores[preference] = movie.Core;
}
}