add --load-state to go along with --load-slot
This commit is contained in:
parent
11891d0e6c
commit
5906bf232b
|
@ -144,6 +144,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// TODO - replace this with some kind of standard dictionary-yielding parser in a separate component
|
// TODO - replace this with some kind of standard dictionary-yielding parser in a separate component
|
||||||
string cmdRom = null;
|
string cmdRom = null;
|
||||||
string cmdLoadState = null;
|
string cmdLoadState = null;
|
||||||
|
string cmdLoadSlot = null;
|
||||||
string cmdMovie = null;
|
string cmdMovie = null;
|
||||||
string cmdDumpType = null;
|
string cmdDumpType = null;
|
||||||
string cmdDumpName = null;
|
string cmdDumpName = null;
|
||||||
|
@ -161,6 +162,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
var arg = args[i].ToLower();
|
var arg = args[i].ToLower();
|
||||||
if (arg.StartsWith("--load-slot="))
|
if (arg.StartsWith("--load-slot="))
|
||||||
|
{
|
||||||
|
cmdLoadSlot = arg.Substring(arg.IndexOf('=') + 1);
|
||||||
|
}
|
||||||
|
if (arg.StartsWith("--load-state="))
|
||||||
{
|
{
|
||||||
cmdLoadState = arg.Substring(arg.IndexOf('=') + 1);
|
cmdLoadState = arg.Substring(arg.IndexOf('=') + 1);
|
||||||
}
|
}
|
||||||
|
@ -401,14 +406,21 @@ namespace BizHawk.Client.EmuHawk
|
||||||
ToggleFullscreen();
|
ToggleFullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmdLoadState != null && !Global.Game.IsNullInstance)
|
if(!Global.Game.IsNullInstance)
|
||||||
{
|
{
|
||||||
LoadQuickSave("QuickSave" + cmdLoadState);
|
if(cmdLoadState != null)
|
||||||
|
{
|
||||||
|
LoadState(cmdLoadState,Path.GetFileName(cmdLoadState));
|
||||||
}
|
}
|
||||||
else if (Global.Config.AutoLoadLastSaveSlot && !Global.Game.IsNullInstance)
|
else if (cmdLoadSlot != null)
|
||||||
|
{
|
||||||
|
LoadQuickSave("QuickSave" + cmdLoadSlot);
|
||||||
|
}
|
||||||
|
else if (Global.Config.AutoLoadLastSaveSlot)
|
||||||
{
|
{
|
||||||
LoadQuickSave("QuickSave" + Global.Config.SaveSlot);
|
LoadQuickSave("QuickSave" + Global.Config.SaveSlot);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GlobalWin.Tools.AutoLoad();
|
GlobalWin.Tools.AutoLoad();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue