diff --git a/BizHawk.Client.Common/RomLoader.cs b/BizHawk.Client.Common/RomLoader.cs index a4a94e8de6..7ef703bd55 100644 --- a/BizHawk.Client.Common/RomLoader.cs +++ b/BizHawk.Client.Common/RomLoader.cs @@ -124,11 +124,17 @@ namespace BizHawk.Client.Common public Func ChoosePlatform { get; set; } + // in case we get sent back through the picker more than once, use the same choice the second time + int? previouschoice; private int? HandleArchive(HawkFile file) { + if (previouschoice.HasValue) + return previouschoice; + if (ChooseArchive != null) { - return ChooseArchive(file); + previouschoice = ChooseArchive(file); + return previouschoice; } return null; @@ -184,7 +190,7 @@ namespace BizHawk.Client.Common // if we have an archive and need to bind something, then pop the dialog if (file.IsArchive && !file.IsBound) { - var result = HandleArchive(file); + int? result = HandleArchive(file); if (result.HasValue) { file.BindArchiveMember(result.Value);