From ddf889e8bc161f33075093b0258c5dcec6da22cd Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 19 Aug 2018 21:48:10 +0200 Subject: [PATCH] Move WinMain entry point to a separate source file. --- profiler/build/win32/Tracy.vcxproj | 1 + profiler/build/win32/Tracy.vcxproj.filters | 3 +++ profiler/src/main.cpp | 8 -------- profiler/src/winmain.cpp | 11 +++++++++++ 4 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 profiler/src/winmain.cpp diff --git a/profiler/build/win32/Tracy.vcxproj b/profiler/build/win32/Tracy.vcxproj index 565a075c..e044ff19 100644 --- a/profiler/build/win32/Tracy.vcxproj +++ b/profiler/build/win32/Tracy.vcxproj @@ -110,6 +110,7 @@ + diff --git a/profiler/build/win32/Tracy.vcxproj.filters b/profiler/build/win32/Tracy.vcxproj.filters index 3616657b..884f0256 100644 --- a/profiler/build/win32/Tracy.vcxproj.filters +++ b/profiler/build/win32/Tracy.vcxproj.filters @@ -75,6 +75,9 @@ src + + src + diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index 6a65f2e6..3c3d4b55 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -314,11 +314,3 @@ int main( int argc, char** argv ) return 0; } - -#ifdef _WIN32 -#include -int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmd, int nCmd ) -{ - return main( __argc, __argv ); -} -#endif diff --git a/profiler/src/winmain.cpp b/profiler/src/winmain.cpp new file mode 100644 index 00000000..40f456e0 --- /dev/null +++ b/profiler/src/winmain.cpp @@ -0,0 +1,11 @@ +#ifdef _WIN32 +# include +# include + +int main( int argc, char** argv ); + +int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmd, int nCmd ) +{ + return main( __argc, __argv ); +} +#endif