summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorRachel Bryk <RachelBryk@gmail.com>2014-09-30 09:21:34 -0400
committerRachel Bryk <RachelBryk@gmail.com>2014-09-30 09:21:34 -0400
commitc0270f63c533af7482d554053944ce671e15fe78 (patch)
treeae9c2d147a27ca16e4c621d3079667cda4a4e554 /Source
parenta9b4016cd3a4c86a7efc8345433ed403dfc78acf (diff)
If one argument is given, assume it is a game, and run it.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinWX/Main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp
index 09aadf76cc..d8f57c0665 100644
--- a/Source/Core/DolphinWX/Main.cpp
+++ b/Source/Core/DolphinWX/Main.cpp
@@ -213,14 +213,20 @@ 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");
- LoadFile = parser.Found("exec", &FileToLoad);
+ if (!LoadFile)
+ LoadFile = parser.Found("exec", &FileToLoad);
BatchMode = parser.Found("batch");
selectVideoBackend = parser.Found("video_backend", &videoBackendName);
selectAudioEmulation = parser.Found("audio_emulation", &audioEmulationName);