Also check PreferredPlatformsForExtensions for single-file archives

resolves #2915
This commit is contained in:
YoshiRulz 2021-08-24 10:20:42 +10:00
parent 559c8efcf1
commit 24f69eb5a6
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 8 additions and 0 deletions

View File

@ -199,6 +199,14 @@ namespace BizHawk.Client.Common
{
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)