Parse arguments before Qt
This commit is contained in:
parent
62707986b7
commit
d6fb0b44d7
|
@ -92,6 +92,10 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
#endif
|
#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_EnableHighDpiScaling);
|
||||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
QCoreApplication::setOrganizationName(QStringLiteral("Dolphin Emulator"));
|
QCoreApplication::setOrganizationName(QStringLiteral("Dolphin Emulator"));
|
||||||
|
@ -109,10 +113,6 @@ int main(int argc, char* argv[])
|
||||||
QApplication::setFont(QApplication::font("QMenu"));
|
QApplication::setFont(QApplication::font("QMenu"));
|
||||||
#endif
|
#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
|
#ifdef _WIN32
|
||||||
FreeConsole();
|
FreeConsole();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue