Skip to content

Commit

Permalink
Parse arguments before Qt
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexApps99 committed Mar 22, 2020
1 parent 6270798 commit d6fb0b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Core/DolphinQt/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ int main(int argc, char* argv[])
}
#endif

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();

QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QCoreApplication::setOrganizationName(QStringLiteral("Dolphin Emulator"));
Expand All @@ -109,10 +113,6 @@ int main(int argc, char* argv[])
QApplication::setFont(QApplication::font("QMenu"));
#endif

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();

#ifdef _WIN32
FreeConsole();
#endif
Expand Down

0 comments on commit d6fb0b4

Please sign in to comment.