summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorAnthony <Helios747@users.noreply.github.com>2017-06-14 13:40:37 -0700
committerGitHub <noreply@github.com>2017-06-14 13:40:37 -0700
commit335f54cac6ed15148fb7f959ccee9d63b583ea32 (patch)
tree91c7def47837251318cf8b5d3067f022c3d62ccc /Source/Core
parent40a9e585a71a73a095005219a376ee0fb03b92d6 (diff)
parenta9630727fe6b9c0180a937743c62b7c47a0aed54 (diff)
Merge pull request #5609 from leoetlino/qt-user-path
Qt: Support custom user profile paths
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinQt2/Main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt2/Main.cpp b/Source/Core/DolphinQt2/Main.cpp
index 439c8b81c3..06fc993aaf 100644
--- a/Source/Core/DolphinQt2/Main.cpp
+++ b/Source/Core/DolphinQt2/Main.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <OptionParser.h>
#include <QAbstractEventDispatcher>
#include <QApplication>
#include <QMessageBox>
@@ -15,6 +16,7 @@
#include "DolphinQt2/MainWindow.h"
#include "DolphinQt2/Resources.h"
#include "DolphinQt2/Settings.h"
+#include "UICommon/CommandLineParse.h"
#include "UICommon/UICommon.h"
int main(int argc, char* argv[])
@@ -24,7 +26,11 @@ int main(int argc, char* argv[])
QApplication app(argc, argv);
- UICommon::SetUserDirectory("");
+ auto parser = CommandLineParse::CreateParser(CommandLineParse::ParserOptions::IncludeGUIOptions);
+ const optparse::Values& options = CommandLineParse::ParseArguments(parser.get(), argc, argv);
+ const std::vector<std::string> args = parser->args();
+
+ UICommon::SetUserDirectory(static_cast<const char*>(options.get("user")));
UICommon::CreateDirectories();
UICommon::Init();
Resources::Init();