From d7423d45a0fd793a93d81fcd9977686e008b353d Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 17 Jun 2017 17:29:03 -0500 Subject: [PATCH] File Extensions dialog - support .cue, also fix specific platform setting it looks like it never worked in the first place --- BizHawk.Client.Common/RomLoader.cs | 10 +++++++++- BizHawk.Client.Common/config/Config.cs | 1 + .../config/FileExtensionPreferencesPicker.cs | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.Common/RomLoader.cs b/BizHawk.Client.Common/RomLoader.cs index d046d3c3a4..26bce66816 100644 --- a/BizHawk.Client.Common/RomLoader.cs +++ b/BizHawk.Client.Common/RomLoader.cs @@ -479,7 +479,15 @@ namespace BizHawk.Client.Common case DiscType.TurboCD: case DiscType.UnknownCDFS: case DiscType.UnknownFormat: - game.System = "PCECD"; + if (PreferredPlatformIsDefined(ext)) + { + game.System = Global.Config.PreferredPlatformsForExtensions[ext]; + } + else + { + game.System = "PCECD"; + } + break; } } diff --git a/BizHawk.Client.Common/config/Config.cs b/BizHawk.Client.Common/config/Config.cs index 48d730cda4..64259c956c 100644 --- a/BizHawk.Client.Common/config/Config.cs +++ b/BizHawk.Client.Common/config/Config.cs @@ -46,6 +46,7 @@ namespace BizHawk.Client.Common { ".rom", "" }, { ".iso", "" }, { ".img", "" }, + { ".cue", "" } }; // Path Settings ************************************/ diff --git a/BizHawk.Client.EmuHawk/config/FileExtensionPreferencesPicker.cs b/BizHawk.Client.EmuHawk/config/FileExtensionPreferencesPicker.cs index 7e7d020998..9b7812a910 100644 --- a/BizHawk.Client.EmuHawk/config/FileExtensionPreferencesPicker.cs +++ b/BizHawk.Client.EmuHawk/config/FileExtensionPreferencesPicker.cs @@ -28,7 +28,7 @@ namespace BizHawk.Client.EmuHawk if (PlatformDropdown.SelectedIndex > 0) { return _availableSystems - .First(x => x.SystemId == PlatformDropdown.SelectedItem.ToString()).FullName; + .First(x => x.FullName == PlatformDropdown.SelectedItem.ToString()).SystemId; } return "";