Fix bug 1492: Visual Studio builds sdl.lib and sdl.dll for version 2.0 (contributed by Jan Reitz); update SDL_bool handling in test_common to fix VS compiler warnings

This commit is contained in:
Andreas Schiffler 2013-05-30 20:03:56 -07:00
parent acb14cfc03
commit 5d3e05c2c4
16 changed files with 78 additions and 78 deletions

View file

@ -19,7 +19,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDL</ProjectName>
<ProjectName>SDL2</ProjectName>
<ProjectGuid>{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}</ProjectGuid>
<RootNamespace>SDL</RootNamespace>
</PropertyGroup>

View file

@ -19,7 +19,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDLmain</ProjectName>
<ProjectName>SDL2main</ProjectName>
<ProjectGuid>{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

View file

@ -19,7 +19,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDLtest</ProjectName>
<ProjectName>SDL2test</ProjectName>
<ProjectGuid>{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

View file

@ -109,7 +109,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -143,7 +143,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -178,7 +178,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -212,7 +212,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -222,8 +222,8 @@
<ClCompile Include="..\..\..\test\checkkeys.c" />
</ItemGroup>
<ItemGroup>
<Library Include="..\..\Sdl\$(Platform)\$(Configuration)\SDL.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib" />
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL2.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDL2main.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View file

@ -109,7 +109,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -143,7 +143,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -178,7 +178,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -212,7 +212,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -222,8 +222,8 @@
<ClCompile Include="..\..\..\Test\Loopwave.c" />
</ItemGroup>
<ItemGroup>
<Library Include="..\..\Sdl\$(Platform)\$(Configuration)\SDL.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib" />
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL2.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDL2main.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View file

@ -97,7 +97,7 @@
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -120,7 +120,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -147,7 +147,7 @@
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -173,7 +173,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -203,9 +203,9 @@
<ClInclude Include="..\..\..\test\testautomation_suites.h" />
</ItemGroup>
<ItemGroup>
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib" />
<Library Include="..\..\SDLtest\$(Platform)\$(Configuration)\SDLtest.lib" />
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL2.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDL2main.lib" />
<Library Include="..\..\SDLtest\$(Platform)\$(Configuration)\SDL2test.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View file

@ -109,7 +109,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -143,7 +143,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -178,7 +178,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -212,7 +212,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -222,9 +222,9 @@
<ClCompile Include="..\..\..\test\testdraw2.c" />
</ItemGroup>
<ItemGroup>
<Library Include="..\..\Sdl\$(Platform)\$(Configuration)\SDL.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib" />
<Library Include="..\..\SDLtest\$(Platform)\$(Configuration)\SDLtest.lib" />
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL2.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDL2main.lib" />
<Library Include="..\..\SDLtest\$(Platform)\$(Configuration)\SDL2test.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View file

@ -109,7 +109,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -143,7 +143,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -178,7 +178,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -212,15 +212,15 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<Library Include="..\..\Sdl\$(Platform)\$(Configuration)\SDL.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib" />
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL2.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDL2main.lib" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\Test\testfile.c" />

View file

@ -105,7 +105,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -139,7 +139,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -174,7 +174,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -208,15 +208,15 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<Library Include="..\..\Sdl\$(Platform)\$(Configuration)\SDL.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib" />
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL2.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDL2main.lib" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\testgamecontroller.c" />

View file

@ -110,7 +110,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -145,7 +145,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -181,7 +181,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -216,7 +216,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -226,9 +226,9 @@
<ClCompile Include="..\..\..\test\testgl2.c" />
</ItemGroup>
<ItemGroup>
<Library Include="..\..\Sdl\$(Platform)\$(Configuration)\SDL.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib" />
<Library Include="..\..\SDLtest\$(Platform)\$(Configuration)\SDLtest.lib" />
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL2.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDL2main.lib" />
<Library Include="..\..\SDLtest\$(Platform)\$(Configuration)\SDL2test.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View file

@ -110,7 +110,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -144,7 +144,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -186,7 +186,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -221,15 +221,15 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<Library Include="..\..\Sdl\$(Platform)\$(Configuration)\SDL.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib" />
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL2.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDL2main.lib" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\Test\testplatform.c">

View file

@ -109,7 +109,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -143,7 +143,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -178,7 +178,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -212,15 +212,15 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<Library Include="..\..\Sdl\$(Platform)\$(Configuration)\SDL.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib" />
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL2.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDL2main.lib" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\testpower.c" />

View file

@ -109,7 +109,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -143,7 +143,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -178,7 +178,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
@ -212,15 +212,15 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<Library Include="..\..\Sdl\$(Platform)\$(Configuration)\SDL.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib" />
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL2.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDL2main.lib" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\testshape.c" />

View file

@ -109,7 +109,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"</Command>
</PostBuildEvent>
<PostBuildEvent>
@ -144,7 +144,7 @@ copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"</Command>
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"</Command>
</PostBuildEvent>
<PostBuildEvent>
@ -180,7 +180,7 @@ copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"</Command>
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"</Command>
</PostBuildEvent>
<PostBuildEvent>
@ -215,7 +215,7 @@ copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"</Command>
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"</Command>
</PostBuildEvent>
<PostBuildEvent>
@ -226,9 +226,9 @@ copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"</Command>
<ClCompile Include="..\..\..\test\testsprite2.c" />
</ItemGroup>
<ItemGroup>
<Library Include="..\..\Sdl\$(Platform)\$(Configuration)\SDL.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib" />
<Library Include="..\..\SDLtest\$(Platform)\$(Configuration)\SDLtest.lib" />
<Library Include="..\..\SDL\$(Platform)\$(Configuration)\SDL2.lib" />
<Library Include="..\..\SDLmain\$(Platform)\$(Configuration)\SDL2main.lib" />
<Library Include="..\..\SDLtest\$(Platform)\$(Configuration)\SDL2test.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View file

@ -139,7 +139,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL.dl"l</Command>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>

View file

@ -325,7 +325,7 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index)
if (!argv[index]) {
return -1;
}
state->scale = SDL_atof(argv[index]);
state->scale = (float)SDL_atof(argv[index]);
return 2;
}
if (SDL_strcasecmp(argv[index], "--depth") == 0) {
@ -1262,7 +1262,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
/* Ctrl-G toggle grab */
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
if (window) {
SDL_SetWindowGrab(window, !SDL_GetWindowGrab(window));
SDL_SetWindowGrab(window, !SDL_GetWindowGrab(window) ? SDL_TRUE : SDL_FALSE);
}
}
break;
@ -1283,7 +1283,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
case SDLK_r:
if (event->key.keysym.mod & KMOD_CTRL) {
/* Ctrl-R toggle mouse relative mode */
SDL_SetRelativeMouseMode(!SDL_GetRelativeMouseMode());
SDL_SetRelativeMouseMode(!SDL_GetRelativeMouseMode() ? SDL_TRUE : SDL_FALSE);
}
break;
case SDLK_z:
@ -1315,7 +1315,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
if (window) {
const Uint32 flags = SDL_GetWindowFlags(window);
const SDL_bool b = ((flags & SDL_WINDOW_BORDERLESS) != 0);
const SDL_bool b = ((flags & SDL_WINDOW_BORDERLESS) != 0) ? SDL_TRUE : SDL_FALSE;
SDL_SetWindowBordered(window, b);
}
}