Merge pull request #8683 from AlexApps99/cmdl

Parse arguments before Qt
This commit is contained in:
Léo Lam 2020-03-24 10:02:24 +01:00 committed by GitHub
commit b3ad3c3b07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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"));
@ -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