multiclient: add some quick commandline load-slot handling
This commit is contained in:
parent
1d00b7fe6b
commit
fe2b6568fc
|
@ -92,11 +92,26 @@ namespace BizHawk.MultiClient
|
|||
|
||||
Application.Idle += Application_Idle;
|
||||
|
||||
if (args.Length != 0)
|
||||
LoadRom(args[0]);
|
||||
//TODO - replace this with some kind of standard dictionary-yielding parser in a separate component
|
||||
string cmdRom = null;
|
||||
string cmdLoadState = null;
|
||||
for (int i = 0; i < args.Length; i++)
|
||||
{
|
||||
string arg = args[i].ToLower();
|
||||
if (arg.StartsWith("--load-slot="))
|
||||
cmdLoadState = arg.Substring(arg.IndexOf('=')+1);
|
||||
else
|
||||
cmdRom = arg;
|
||||
}
|
||||
|
||||
if(cmdRom != null)
|
||||
LoadRom(cmdRom);
|
||||
else if (Global.Config.AutoLoadMostRecentRom && !Global.Config.RecentRoms.IsEmpty())
|
||||
LoadRomFromRecent(Global.Config.RecentRoms.GetRecentFileByPosition(0));
|
||||
|
||||
if(cmdLoadState != null)
|
||||
LoadState("QuickSave" + cmdLoadState);
|
||||
|
||||
if (Global.Config.AutoLoadRamWatch)
|
||||
LoadRamWatch();
|
||||
if (Global.Config.AutoLoadRamSearch)
|
||||
|
|
Loading…
Reference in New Issue