Skip to content

Commit

Permalink
Also check PreferredPlatformsForExtensions for single-file archives
Browse files Browse the repository at this point in the history
resolves #2915
  • Loading branch information
YoshiRulz committed Aug 24, 2021
1 parent 559c8ef commit 24f69eb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/BizHawk.Client.Common/RomLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ private bool HandleArchiveBinding(HawkFile file)
{
file.BindSoleItemOf(RomFileExtensions.AutoloadFromArchive);
}
// ...including unrecognised extensions that the user has set a platform for
if (!file.IsBound)
{
var exts = _config.PreferredPlatformsForExtensions.Where(static kvp => !string.IsNullOrEmpty(kvp.Value))
.Select(static kvp => kvp.Key)
.ToList();
if (exts.Count is not 0) file.BindSoleItemOf(exts);
}

// if we have an archive and need to bind something, then pop the dialog
if (file.IsArchive && !file.IsBound)
Expand Down

0 comments on commit 24f69eb

Please sign in to comment.