DolphinQt: Stop using qtmain

This commit is contained in:
JosJuice 2020-09-21 17:25:47 +02:00
parent 16d2ef1ea9
commit 17e02838b0
2 changed files with 9 additions and 4 deletions

View File

@ -99,11 +99,12 @@ static bool QtMsgAlertHandler(const char* caption, const char* text, bool yes_no
return false;
}
// N.B. On Windows, this should be called from WinMain. Link against qtmain and specify
// /SubSystem:Windows
#ifndef _WIN32
int main(int argc, char* argv[])
{
#ifdef _WIN32
#else
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
{
std::vector<std::string> utf8_args = CommandLineToUtf8Argv(GetCommandLineW());
const int utf8_argc = static_cast<int>(utf8_args.size());
std::vector<char*> utf8_argv(utf8_args.size());
@ -146,7 +147,11 @@ int main(int argc, char* argv[])
QCoreApplication::setOrganizationDomain(QStringLiteral("dolphin-emu.org"));
QCoreApplication::setApplicationName(QStringLiteral("dolphin-emu"));
#ifdef _WIN32
QApplication app(__argc, __argv);
#else
QApplication app(argc, argv);
#endif
#ifdef _WIN32
// On Windows, Qt 5's default system font (MS Shell Dlg 2) is outdated.

View File

@ -35,7 +35,7 @@
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(QtLibDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>qtmain$(QtLibSuffix).lib;Qt5Core$(QtLibSuffix).lib;Qt5Gui$(QtLibSuffix).lib;Qt5Widgets$(QtLibSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Qt5Core$(QtLibSuffix).lib;Qt5Gui$(QtLibSuffix).lib;Qt5Widgets$(QtLibSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
<!--
<AdditionalOptions>"/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\" %(AdditionalOptions)</AdditionalOptions>