diff --git a/Source/Core/DolphinQt/Main.cpp b/Source/Core/DolphinQt/Main.cpp index 37415224dd..8e1e63d030 100644 --- a/Source/Core/DolphinQt/Main.cpp +++ b/Source/Core/DolphinQt/Main.cpp @@ -147,19 +147,16 @@ 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 args = parser->args(); - QCoreApplication::setOrganizationName(QStringLiteral("Dolphin Emulator")); QCoreApplication::setOrganizationDomain(QStringLiteral("dolphin-emu.org")); QCoreApplication::setApplicationName(QStringLiteral("dolphin-emu")); -#ifdef _WIN32 - QApplication app(__argc, __argv); -#else + // QApplication will parse arguments and remove any it recognizes as targeting Qt QApplication app(argc, argv); -#endif + + auto parser = CommandLineParse::CreateParser(CommandLineParse::ParserOptions::IncludeGUIOptions); + const optparse::Values& options = CommandLineParse::ParseArguments(parser.get(), argc, argv); + const std::vector args = parser->args(); #ifdef _WIN32 FreeConsole();