fix loading of roms from commandline

This commit is contained in:
zeromus 2015-11-12 17:47:39 -06:00
parent 53eae133e7
commit 283cb4ae50
4 changed files with 5 additions and 5 deletions

View File

@ -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();

View File

@ -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()

View File

@ -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(

View File

@ -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() });
}
}