Skip to content

Commit 24f69eb

Browse files
committed
Also check PreferredPlatformsForExtensions for single-file archives
resolves #2915
1 parent 559c8ef commit 24f69eb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/BizHawk.Client.Common/RomLoader.cs

+8
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,14 @@ private bool HandleArchiveBinding(HawkFile file)
199199
{
200200
file.BindSoleItemOf(RomFileExtensions.AutoloadFromArchive);
201201
}
202+
// ...including unrecognised extensions that the user has set a platform for
203+
if (!file.IsBound)
204+
{
205+
var exts = _config.PreferredPlatformsForExtensions.Where(static kvp => !string.IsNullOrEmpty(kvp.Value))
206+
.Select(static kvp => kvp.Key)
207+
.ToList();
208+
if (exts.Count is not 0) file.BindSoleItemOf(exts);
209+
}
202210

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

0 commit comments

Comments
 (0)