add --dump-close commandline argument, if capturing and specifying a dump-length, setting this property will close the emulator after it has reached the length specified in dump-length
This commit is contained in:
parent
7c532fbd01
commit
04b625ab68
|
@ -138,6 +138,7 @@ namespace BizHawk.MultiClient
|
||||||
/// number of frames to autodump
|
/// number of frames to autodump
|
||||||
/// </summary>
|
/// </summary>
|
||||||
int autoDumpLength;
|
int autoDumpLength;
|
||||||
|
bool autoCloseOnDump = false;
|
||||||
|
|
||||||
static MainForm()
|
static MainForm()
|
||||||
{
|
{
|
||||||
|
@ -243,18 +244,20 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
|
|
||||||
string arg = args[i].ToLower();
|
string arg = args[i].ToLower();
|
||||||
if (arg.StartsWith("--load-slot="))
|
if (arg.StartsWith("--load-slot="))
|
||||||
cmdLoadState = arg.Substring(arg.IndexOf('=') + 1);
|
cmdLoadState = arg.Substring(arg.IndexOf('=') + 1);
|
||||||
else if (arg.StartsWith("--movie="))
|
else if (arg.StartsWith("--movie="))
|
||||||
cmdMovie = arg.Substring(arg.IndexOf('=') + 1);
|
cmdMovie = arg.Substring(arg.IndexOf('=') + 1);
|
||||||
else if (arg.StartsWith("--dump-type="))
|
else if (arg.StartsWith("--dump-type="))
|
||||||
cmdDumpType = arg.Substring(arg.IndexOf('=') + 1);
|
cmdDumpType = arg.Substring(arg.IndexOf('=') + 1);
|
||||||
else if (arg.StartsWith("--dump-name="))
|
else if (arg.StartsWith("--dump-name="))
|
||||||
cmdDumpName = arg.Substring(arg.IndexOf('=') + 1);
|
cmdDumpName = arg.Substring(arg.IndexOf('=') + 1);
|
||||||
else if (arg.StartsWith("--dump-length="))
|
else if (arg.StartsWith("--dump-length="))
|
||||||
int.TryParse(arg.Substring(arg.IndexOf('=') + 1), out autoDumpLength);
|
int.TryParse(arg.Substring(arg.IndexOf('=') + 1), out autoDumpLength);
|
||||||
else
|
else if (arg.StartsWith("--dump_close="))
|
||||||
cmdRom = arg;
|
autoCloseOnDump = true;
|
||||||
|
else
|
||||||
|
cmdRom = arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmdRom != null)
|
if (cmdRom != null)
|
||||||
|
@ -3762,8 +3765,14 @@ namespace BizHawk.MultiClient
|
||||||
if (autoDumpLength > 0)
|
if (autoDumpLength > 0)
|
||||||
{
|
{
|
||||||
autoDumpLength--;
|
autoDumpLength--;
|
||||||
if (autoDumpLength == 0) // finish
|
if (autoDumpLength == 0) // finish
|
||||||
StopAVI();
|
{
|
||||||
|
StopAVI();
|
||||||
|
if (autoCloseOnDump)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue