Skip to content

Commit

Permalink
Update SDL2 and tweak init
Browse files Browse the repository at this point in the history
  • Loading branch information
Boomslangnz committed Sep 11, 2023
1 parent 55b96f6 commit cdf4a08
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Dinput8Wrapper.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,14 @@ cd $(OutDir) && for /D /r %d in (.\Deploy\*) do @xcopy *.dll %d\
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
<Import Project="packages\sdl2.nuget.redist.2.24.2\build\native\sdl2.nuget.redist.targets" Condition="Exists('packages\sdl2.nuget.redist.2.24.2\build\native\sdl2.nuget.redist.targets')" />
<Import Project="packages\sdl2.nuget.2.24.2\build\native\sdl2.nuget.targets" Condition="Exists('packages\sdl2.nuget.2.24.2\build\native\sdl2.nuget.targets')" />
<Import Project="packages\sdl2.nuget.redist.2.28.3\build\native\sdl2.nuget.redist.targets" Condition="Exists('packages\sdl2.nuget.redist.2.28.3\build\native\sdl2.nuget.redist.targets')" />
<Import Project="packages\sdl2.nuget.2.28.3\build\native\sdl2.nuget.targets" Condition="Exists('packages\sdl2.nuget.2.28.3\build\native\sdl2.nuget.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\sdl2.nuget.redist.2.24.2\build\native\sdl2.nuget.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\sdl2.nuget.redist.2.24.2\build\native\sdl2.nuget.redist.targets'))" />
<Error Condition="!Exists('packages\sdl2.nuget.2.24.2\build\native\sdl2.nuget.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\sdl2.nuget.2.24.2\build\native\sdl2.nuget.targets'))" />
<Error Condition="!Exists('packages\sdl2.nuget.redist.2.28.3\build\native\sdl2.nuget.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\sdl2.nuget.redist.2.28.3\build\native\sdl2.nuget.redist.targets'))" />
<Error Condition="!Exists('packages\sdl2.nuget.2.28.3\build\native\sdl2.nuget.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\sdl2.nuget.2.28.3\build\native\sdl2.nuget.targets'))" />
</Target>
</Project>
4 changes: 1 addition & 3 deletions DllMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,9 +1075,7 @@ void Initialize(int device_index)
{
hlp.log("in initialize");
SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0");
SDL_Init(SDL_INIT_HAPTIC | SDL_INIT_SENSOR);
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0);
if (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) < 0);
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER) < 0)
SDL_JoystickEventState(SDL_ENABLE);
SDL_JoystickUpdate();
char joystick_guid[256];
Expand Down
2 changes: 1 addition & 1 deletion Version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0.0.33
v2.0.0.34
4 changes: 2 additions & 2 deletions packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="sdl2.nuget" version="2.24.2" targetFramework="native" />
<package id="sdl2.nuget.redist" version="2.24.2" targetFramework="native" />
<package id="sdl2.nuget" version="2.28.3" targetFramework="native" />
<package id="sdl2.nuget.redist" version="2.28.3" targetFramework="native" />
</packages>

0 comments on commit cdf4a08

Please sign in to comment.