Move WinMain entry point to a separate source file.

This commit is contained in:
Bartosz Taudul 2018-08-19 21:48:10 +02:00
parent d63b5431bf
commit ddf889e8bc
4 changed files with 15 additions and 8 deletions

View File

@ -110,6 +110,7 @@
<ClCompile Include="..\..\src\imgui_freetype.cpp" /> <ClCompile Include="..\..\src\imgui_freetype.cpp" />
<ClCompile Include="..\..\src\imgui_impl_glfw_gl3.cpp" /> <ClCompile Include="..\..\src\imgui_impl_glfw_gl3.cpp" />
<ClCompile Include="..\..\src\main.cpp" /> <ClCompile Include="..\..\src\main.cpp" />
<ClCompile Include="..\..\src\winmain.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\..\common\TracyAlign.hpp" /> <ClInclude Include="..\..\..\common\TracyAlign.hpp" />

View File

@ -75,6 +75,9 @@
<ClCompile Include="..\..\src\imgui_freetype.cpp"> <ClCompile Include="..\..\src\imgui_freetype.cpp">
<Filter>src</Filter> <Filter>src</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\winmain.cpp">
<Filter>src</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\..\common\tracy_lz4.hpp"> <ClInclude Include="..\..\..\common\tracy_lz4.hpp">

View File

@ -314,11 +314,3 @@ int main( int argc, char** argv )
return 0; return 0;
} }
#ifdef _WIN32
#include <stdlib.h>
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmd, int nCmd )
{
return main( __argc, __argv );
}
#endif

11
profiler/src/winmain.cpp Normal file
View File

@ -0,0 +1,11 @@
#ifdef _WIN32
# include <windows.h>
# include <stdlib.h>
int main( int argc, char** argv );
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmd, int nCmd )
{
return main( __argc, __argv );
}
#endif