Remove IOpenAdvanced parsing from places unrelated to recents menu
This commit is contained in:
parent
19bf70a9c9
commit
12310befff
|
@ -140,7 +140,7 @@ namespace BizHawk.Client.Common
|
|||
suppressOSD: false);
|
||||
|
||||
public bool OpenRom(string path)
|
||||
=> _mainForm.LoadRom(path, new LoadRomArgs { OpenAdvanced = OpenAdvancedSerializer.ParseWithLegacy(path) });
|
||||
=> _mainForm.LoadRom(path, new LoadRomArgs { OpenAdvanced = new OpenAdvanced_OpenRom { Path = path } });
|
||||
|
||||
public void Pause() => _mainForm.PauseEmulator();
|
||||
|
||||
|
|
|
@ -629,7 +629,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (_argParser.cmdRom != null)
|
||||
{
|
||||
// Commandline should always override auto-load
|
||||
var ioa = OpenAdvancedSerializer.ParseWithLegacy(_argParser.cmdRom);
|
||||
OpenAdvanced_OpenRom ioa = new() { Path = _argParser.cmdRom };
|
||||
if (ioa is OpenAdvanced_OpenRom oaor) ioa = new OpenAdvanced_OpenRom { Path = oaor.Path.MakeAbsolute() }; // fixes #3224; should this be done for all the IOpenAdvanced types? --yoshi
|
||||
_ = LoadRom(ioa.SimplePath, new LoadRomArgs { OpenAdvanced = ioa });
|
||||
if (Game.IsNullInstance())
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Marshal.Copy(name, 0, buffer, Math.Min(name.Length, 256));
|
||||
};
|
||||
_resetEmulator = () => _mainForm.RebootCore();
|
||||
_loadROM = path => _ = _mainForm.LoadRom(path, new() { OpenAdvanced = OpenAdvancedSerializer.ParseWithLegacy(path) });
|
||||
_loadROM = path => _ = _mainForm.LoadRom(path, new() { OpenAdvanced = new OpenAdvanced_OpenRom { Path = path } });
|
||||
|
||||
RA.InstallSharedFunctionsExt(_isActive, _unpause, _pause, _rebuildMenu, _estimateTitle, _resetEmulator, _loadROM);
|
||||
|
||||
|
|
Loading…
Reference in New Issue