If one argument is given, assume it is a game, and run it.

This commit is contained in:
Rachel Bryk 2014-09-30 09:21:34 -04:00
parent a9b4016cd3
commit c0270f63c5
1 changed files with 8 additions and 2 deletions

View File

@ -213,13 +213,19 @@ bool DolphinApp::OnInit()
// Gets the command line parameters
wxCmdLineParser parser(cmdLineDesc, argc, argv);
if (parser.Parse() != 0)
if (argc == 2)
{
LoadFile = true;
FileToLoad = argv[1];
}
else if (parser.Parse() != 0)
{
return false;
}
UseDebugger = parser.Found("debugger");
UseLogger = parser.Found("logger");
if (!LoadFile)
LoadFile = parser.Found("exec", &FileToLoad);
BatchMode = parser.Found("batch");
selectVideoBackend = parser.Found("video_backend", &videoBackendName);