Move LoadRomArgs to own file
This commit is contained in:
parent
8b9debb8b9
commit
03acb1ded7
|
@ -234,7 +234,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void OnStateSaved(object sender, string stateName) => StateSaved?.Invoke(sender, new StateSavedEventArgs(stateName));
|
||||
|
||||
public void OpenRom(string path) => _mainForm.LoadRom(path, new MainForm.LoadRomArgs { OpenAdvanced = OpenAdvancedSerializer.ParseWithLegacy(path) });
|
||||
public void OpenRom(string path) => _mainForm.LoadRom(path, new LoadRomArgs { OpenAdvanced = OpenAdvancedSerializer.ParseWithLegacy(path) });
|
||||
|
||||
public void Pause() => _mainForm.PauseEmulator();
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
using BizHawk.Client.Common;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public class LoadRomArgs
|
||||
{
|
||||
public bool? Deterministic { get; set; }
|
||||
public IOpenAdvanced OpenAdvanced { get; set; }
|
||||
}
|
||||
}
|
|
@ -3556,12 +3556,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
return platformChooser.PlatformChoice;
|
||||
}
|
||||
|
||||
public class LoadRomArgs
|
||||
{
|
||||
public bool? Deterministic { get; set; }
|
||||
public IOpenAdvanced OpenAdvanced { get; set; }
|
||||
}
|
||||
|
||||
private LoadRomArgs _currentLoadRomArgs;
|
||||
|
||||
public bool LoadRom(string path, LoadRomArgs args)
|
||||
|
|
|
@ -325,7 +325,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void this_StartupNextInstance(object sender, StartupNextInstanceEventArgs e)
|
||||
{
|
||||
if (e.CommandLine.Count >= 1)
|
||||
((MainForm)MainForm).LoadRom(e.CommandLine[0], new MainForm.LoadRomArgs { OpenAdvanced = new OpenAdvanced_OpenRom() });
|
||||
((MainForm)MainForm).LoadRom(e.CommandLine[0], new LoadRomArgs { OpenAdvanced = new OpenAdvanced_OpenRom() });
|
||||
}
|
||||
|
||||
protected override void OnCreateMainForm()
|
||||
|
|
|
@ -231,7 +231,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
public void OpenRom(string path)
|
||||
{
|
||||
var ioa = OpenAdvancedSerializer.ParseWithLegacy(path);
|
||||
MainForm.LoadRom(path, new MainForm.LoadRomArgs { OpenAdvanced = ioa });
|
||||
MainForm.LoadRom(path, new LoadRomArgs { OpenAdvanced = ioa });
|
||||
}
|
||||
|
||||
[LuaMethodExample("client.opentasstudio( );")]
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
|
||||
var lra = new MainForm.LoadRomArgs { OpenAdvanced = new OpenAdvanced_OpenRom { Path = fileInfo.FullName } };
|
||||
var lra = new LoadRomArgs { OpenAdvanced = new OpenAdvanced_OpenRom { Path = fileInfo.FullName } };
|
||||
MainForm.LoadRom(fileInfo.FullName, lra);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue