win32: print additional command line options, also react to -h /?

This commit is contained in:
OV2 2019-12-26 14:57:54 +01:00
parent 6af12f272f
commit 9e871a29a4
2 changed files with 13 additions and 0 deletions

View File

@ -276,6 +276,13 @@ const TCHAR* WinParseCommandLineAndLoadConfigFile (TCHAR *line)
ReleaseMutex(configMutex);
CloseHandle(configMutex);
// check some additional common help switches
for (int i = 0; i < count; i++)
{
if(!strcasecmp(parameters[i], "/?") || !strcasecmp(parameters[i], "-h"))
S9xUsage();
}
const char* rf = S9xParseArgs (parameters, count);
if(rf) // save rom_filename as TCHAR if available

View File

@ -2690,6 +2690,12 @@ BOOL WinInit( HINSTANCE hInstance)
void S9xExtraUsage ()
{
S9xMessage(S9X_INFO, S9X_USAGE, "Windows port specific:");
S9xMessage(S9X_INFO, S9X_USAGE, "-fullscreen Start in fullscreen mode");
S9xMessage(S9X_INFO, S9X_USAGE, "-hidemenu Initially hide the GUI menu");
S9xMessage(S9X_INFO, S9X_USAGE, "-restore Reset all settings to default");
S9xMessage(S9X_INFO, S9X_USAGE, "-cartb <filename> Specify the second cart for multicart, also triggers multicart");
MessageBox(NULL, _T("Snes9x command line options have been written to stdout.txt in the same folder as snes9x.exe"), _T("Command line options"), MB_OK | MB_ICONINFORMATION);
}
// handles joystick hotkey presses