From 2dda13cdd11e780914fa192660f9baad74673267 Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 2 Jun 2020 17:04:42 -0500 Subject: [PATCH] add GBC to core preferences, keep the ui as GB sets both, but this prepared for us to be able to set them separately --- src/BizHawk.Client.Common/config/Config.cs | 1 + src/BizHawk.Client.Common/movie/MovieSession.cs | 17 +++++------------ src/BizHawk.Client.EmuHawk/MainForm.Events.cs | 1 + 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/BizHawk.Client.Common/config/Config.cs b/src/BizHawk.Client.Common/config/Config.cs index 17a2a174a2..12ce555843 100644 --- a/src/BizHawk.Client.Common/config/Config.cs +++ b/src/BizHawk.Client.Common/config/Config.cs @@ -313,6 +313,7 @@ namespace BizHawk.Client.Common ["NES"] = CoreNames.QuickNes, ["SNES"] = CoreNames.Snes9X, ["GB"] = CoreNames.Gambatte, + ["GBC"] = CoreNames.Gambatte, ["PCE"] = CoreNames.PceHawk, ["PCECD"] = CoreNames.PceHawk, ["SGX"] = CoreNames.PceHawk diff --git a/src/BizHawk.Client.Common/movie/MovieSession.cs b/src/BizHawk.Client.Common/movie/MovieSession.cs index 86a7c3608f..b81e386a9b 100644 --- a/src/BizHawk.Client.Common/movie/MovieSession.cs +++ b/src/BizHawk.Client.Common/movie/MovieSession.cs @@ -251,27 +251,20 @@ namespace BizHawk.Client.Common if (!record) { - var preference = systemId; - if (preference == "GBC") + if (Global.Config.PreferredCores.ContainsKey(systemId)) { - // We want to treat GBC the same as GB - preference = "GB"; - } - - if (Global.Config.PreferredCores.ContainsKey(preference)) - { - string movieCore = Global.Config.PreferredCores[preference]; + string movieCore = Global.Config.PreferredCores[systemId]; if (string.IsNullOrWhiteSpace(movie.Core)) { - PopupMessage($"No core specified in the movie file, using the preferred core {Global.Config.PreferredCores[preference]} instead."); + PopupMessage($"No core specified in the movie file, using the preferred core {Global.Config.PreferredCores[systemId]} instead."); } else { movieCore = movie.Core; } - _preferredCores[preference] = Global.Config.PreferredCores[preference]; - Global.Config.PreferredCores[preference] = movieCore; + _preferredCores[systemId] = Global.Config.PreferredCores[systemId]; + Global.Config.PreferredCores[systemId] = movieCore; } } diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs index 69f9ef17b5..9efb40d67c 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -1284,6 +1284,7 @@ namespace BizHawk.Client.EmuHawk private void GambatteCorePick_Click(object sender, EventArgs e) { Config.PreferredCores["GB"] = CoreNames.Gambatte; + Config.PreferredCores["GBC"] = CoreNames.Gambatte; if (Emulator.SystemId == "GB" || Emulator.SystemId == "GBC") {