summaryrefslogtreecommitdiffstats
path: root/src/entrypoint/qtentrypoint_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/entrypoint/qtentrypoint_win.cpp')
-rw-r--r--src/entrypoint/qtentrypoint_win.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/entrypoint/qtentrypoint_win.cpp b/src/entrypoint/qtentrypoint_win.cpp
index 6ecb814948..f0cf46ba3d 100644
--- a/src/entrypoint/qtentrypoint_win.cpp
+++ b/src/entrypoint/qtentrypoint_win.cpp
@@ -36,7 +36,7 @@ static inline char *wideToMulti(unsigned int codePage, const wchar_t *aw)
return result;
}
-extern "C" int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPSTR /*cmdParamarg*/, int /* cmdShow */)
+static inline int qtEntryPoint()
{
int argc = 0;
wchar_t **argvW = CommandLineToArgvW(GetCommandLineW(), &argc);
@@ -53,3 +53,13 @@ extern "C" int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPSTR /*cmdParamarg*/, int
delete [] argv;
return exitCode;
}
+
+extern "C" int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
+{
+ return qtEntryPoint();
+}
+
+extern "C" int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
+{
+ return qtEntryPoint();
+}