diff --git a/common/vsprops/QtCompile.props b/common/vsprops/QtCompile.props index 773ee60b6c..bc47450c1e 100644 --- a/common/vsprops/QtCompile.props +++ b/common/vsprops/QtCompile.props @@ -21,6 +21,7 @@ d $(QtDebugSuffix) QtPlugins + $(QtLibDir)Qt6EntryPoint$(QtLibSuffix).lib diff --git a/pcsx2-qt/Main.cpp b/pcsx2-qt/Main.cpp index 1992dc62e3..c75622ec3a 100644 --- a/pcsx2-qt/Main.cpp +++ b/pcsx2-qt/Main.cpp @@ -220,45 +220,3 @@ int main(int argc, char* argv[]) QtHost::Shutdown(); return result; } - -#ifdef _WIN32 - -// Apparently Qt6 got rid of this? -#include "common/RedtapeWindows.h" -#include - -/* - WinMain() - Initializes Windows and calls user's startup function main(). - NOTE: WinMain() won't be called if the application was linked as a "console" - application. -*/ - -// Convert a wchar_t to char string, equivalent to QString::toLocal8Bit() -// when passed CP_ACP. -static inline char* wideToMulti(unsigned int codePage, const wchar_t* aw) -{ - const int required = WideCharToMultiByte(codePage, 0, aw, -1, nullptr, 0, nullptr, nullptr); - char* result = new char[required]; - WideCharToMultiByte(codePage, 0, aw, -1, result, required, nullptr, nullptr); - return result; -} - -extern "C" int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPSTR /*cmdParamarg*/, int /* cmdShow */) -{ - int argc = 0; - wchar_t** argvW = CommandLineToArgvW(GetCommandLineW(), &argc); - if (argvW == nullptr) - return -1; - char** argv = new char*[argc + 1]; - for (int i = 0; i != argc; ++i) - argv[i] = wideToMulti(CP_ACP, argvW[i]); - argv[argc] = nullptr; - LocalFree(argvW); - const int exitCode = main(argc, argv); - for (int i = 0; (i != argc) && (argv[i] != nullptr); ++i) - delete[] argv[i]; - delete[] argv; - return exitCode; -} - -#endif \ No newline at end of file diff --git a/pcsx2-qt/pcsx2-qt.vcxproj b/pcsx2-qt/pcsx2-qt.vcxproj index e49b39534c..7991f98ede 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj +++ b/pcsx2-qt/pcsx2-qt.vcxproj @@ -75,6 +75,7 @@ Yes comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;iphlpapi.lib;dsound.lib;%(AdditionalDependencies) dxguid.lib;dinput8.lib;hid.lib;PowrProf.lib;d3dcompiler.lib;d3d11.lib;dxgi.lib;strmiids.lib;opengl32.lib;comsuppw.lib;%(AdditionalDependencies) + $(QtEntryPointLib);%(AdditionalDependencies)