Merge pull request #1194 from RachelBryk/arg

If one argument is given, assume it is a game, and run it.
This commit is contained in:
skidau 2014-10-03 13:31:37 +10:00
commit 6333f41837
1 changed files with 8 additions and 2 deletions

View File

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