Merge pull request #1731 from TheGreatRambler/master
Allow getting the version from the command line
This commit is contained in:
commit
ab5d30c797
|
@ -28,6 +28,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
public bool startFullscreen = false;
|
public bool startFullscreen = false;
|
||||||
public string luaScript = null;
|
public string luaScript = null;
|
||||||
public bool luaConsole = false;
|
public bool luaConsole = false;
|
||||||
|
public bool printVersion = false;
|
||||||
public int socket_port = 0;
|
public int socket_port = 0;
|
||||||
public string socket_ip = null;
|
public string socket_ip = null;
|
||||||
public string mmf_filename = null;
|
public string mmf_filename = null;
|
||||||
|
@ -83,6 +84,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// automatically set dump length to maximum frame
|
// automatically set dump length to maximum frame
|
||||||
_autoDumpLength = _currAviWriterFrameList.OrderBy(x => x).Last();
|
_autoDumpLength = _currAviWriterFrameList.OrderBy(x => x).Last();
|
||||||
}
|
}
|
||||||
|
else if (arg.StartsWith("--version"))
|
||||||
|
{
|
||||||
|
printVersion = true;
|
||||||
|
}
|
||||||
else if (arg.StartsWith("--dump-name="))
|
else if (arg.StartsWith("--dump-name="))
|
||||||
{
|
{
|
||||||
cmdDumpName = args[i].Substring(args[i].IndexOf('=') + 1);
|
cmdDumpName = args[i].Substring(args[i].IndexOf('=') + 1);
|
||||||
|
@ -191,4 +196,4 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -448,6 +448,15 @@ namespace BizHawk.Client.EmuHawk
|
||||||
_needsFullscreenOnLoad = false;
|
_needsFullscreenOnLoad = false;
|
||||||
ToggleFullscreen();
|
ToggleFullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Simply exit the program if the version is asked for
|
||||||
|
if (_argParser.printVersion)
|
||||||
|
{
|
||||||
|
// Print the version
|
||||||
|
Console.WriteLine(VersionInfo.GetEmuVersion());
|
||||||
|
// Return and leave
|
||||||
|
return _exitCode;
|
||||||
|
}
|
||||||
|
|
||||||
// incantation required to get the program reliably on top of the console window
|
// incantation required to get the program reliably on top of the console window
|
||||||
// we might want it in ToggleFullscreen later, but here, it needs to happen regardless
|
// we might want it in ToggleFullscreen later, but here, it needs to happen regardless
|
||||||
|
|
Loading…
Reference in New Issue