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()
|
||||||
{
|
{
|
||||||
|
@ -253,6 +254,8 @@ namespace BizHawk.MultiClient
|
||||||
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 if (arg.StartsWith("--dump_close="))
|
||||||
|
autoCloseOnDump = true;
|
||||||
else
|
else
|
||||||
cmdRom = arg;
|
cmdRom = arg;
|
||||||
}
|
}
|
||||||
|
@ -3763,7 +3766,13 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
autoDumpLength--;
|
autoDumpLength--;
|
||||||
if (autoDumpLength == 0) // finish
|
if (autoDumpLength == 0) // finish
|
||||||
|
{
|
||||||
StopAVI();
|
StopAVI();
|
||||||
|
if (autoCloseOnDump)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue