Skip platform chooser when reloading core

if you make a mistake, you can still reopen via the recents menu
This commit is contained in:
YoshiRulz 2025-05-31 05:18:02 +10:00
parent 7665448202
commit 83169be667
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 5 additions and 2 deletions

View File

@ -2,5 +2,6 @@ namespace BizHawk.Client.Common
{
public sealed record class LoadRomArgs(
IOpenAdvanced OpenAdvanced,
string/*?*/ ForcedSysID = null,
bool? Deterministic = null);
}

View File

@ -1411,7 +1411,9 @@ namespace BizHawk.Client.EmuHawk
else
{
if (CurrentlyOpenRomArgs == null) return true;
return LoadRom(CurrentlyOpenRomArgs.OpenAdvanced.SimplePath, CurrentlyOpenRomArgs);
return LoadRom(
CurrentlyOpenRomArgs.OpenAdvanced.SimplePath,
CurrentlyOpenRomArgs with { ForcedSysID = Emulator.SystemId });
}
}
@ -3766,7 +3768,7 @@ namespace BizHawk.Client.EmuHawk
var loader = new RomLoader(Config, this)
{
ChooseArchive = LoadArchiveChooser,
ChoosePlatform = ChoosePlatformForRom,
ChoosePlatform = romGame => args.ForcedSysID ?? ChoosePlatformForRom(romGame),
Deterministic = deterministic,
MessageCallback = AddOnScreenMessage,
OpenAdvanced = args.OpenAdvanced,