fix loading of roms from commandline
This commit is contained in:
parent
53eae133e7
commit
283cb4ae50
|
@ -321,7 +321,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (cmdRom != null)
|
||||
{
|
||||
// Commandline should always override auto-load
|
||||
LoadRom(cmdRom);
|
||||
LoadRom(cmdRom, new MainForm.LoadRomArgs() { OpenAdvanced = new OpenAdvanced_OpenRom() });
|
||||
if (Global.Game == null)
|
||||
{
|
||||
MessageBox.Show("Failed to load " + cmdRom + " specified on commandline");
|
||||
|
@ -3446,7 +3446,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
LoadRomArgs CurrentLoadRomArgs;
|
||||
|
||||
// Still needs a good bit of refactoring
|
||||
public bool LoadRom(string path, LoadRomArgs args = null)
|
||||
public bool LoadRom(string path, LoadRomArgs args)
|
||||
{
|
||||
//default args
|
||||
if (args == null) args = new LoadRomArgs();
|
||||
|
|
|
@ -307,7 +307,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
void this_StartupNextInstance(object sender, StartupNextInstanceEventArgs e)
|
||||
{
|
||||
if (e.CommandLine.Count >= 1)
|
||||
(MainForm as MainForm).LoadRom(e.CommandLine[0]);
|
||||
(MainForm as MainForm).LoadRom(e.CommandLine[0], new MainForm.LoadRomArgs() { OpenAdvanced = new OpenAdvanced_OpenRom() });
|
||||
}
|
||||
|
||||
protected override void OnCreateMainForm()
|
||||
|
|
|
@ -240,7 +240,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
)]
|
||||
public static void OpenRom(string path)
|
||||
{
|
||||
GlobalWin.MainForm.LoadRom(path);
|
||||
GlobalWin.MainForm.LoadRom(path, new MainForm.LoadRomArgs() { OpenAdvanced = new OpenAdvanced_OpenRom() });
|
||||
}
|
||||
|
||||
[LuaMethodAttributes(
|
||||
|
|
|
@ -109,7 +109,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
|
||||
GlobalWin.MainForm.LoadRom(fileInfo.FullName);
|
||||
GlobalWin.MainForm.LoadRom(fileInfo.FullName, new MainForm.LoadRomArgs() { OpenAdvanced = new OpenAdvanced_OpenRom() });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue