1
0
mirror of synced 2025-02-25 22:08:06 +01:00

Update SDL2 and tweak init

This commit is contained in:
Boomslangnz 2023-09-11 19:10:50 +12:00
parent 55b96f61e3
commit cdf4a0850e
4 changed files with 8 additions and 10 deletions

View File

@ -455,14 +455,14 @@ cd $(OutDir) && for /D /r %d in (.\Deploy\*) do @xcopy *.dll %d\
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" /> <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.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.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.2.28.3\build\native\sdl2.nuget.targets" Condition="Exists('packages\sdl2.nuget.2.28.3\build\native\sdl2.nuget.targets')" />
</ImportGroup> </ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <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> <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> </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.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.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.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> </Target>
</Project> </Project>

View File

@ -1075,9 +1075,7 @@ void Initialize(int device_index)
{ {
hlp.log("in initialize"); hlp.log("in initialize");
SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0"); SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0");
SDL_Init(SDL_INIT_HAPTIC | SDL_INIT_SENSOR); if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER) < 0)
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0);
if (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) < 0);
SDL_JoystickEventState(SDL_ENABLE); SDL_JoystickEventState(SDL_ENABLE);
SDL_JoystickUpdate(); SDL_JoystickUpdate();
char joystick_guid[256]; char joystick_guid[256];

View File

@ -1 +1 @@
v2.0.0.33 v2.0.0.34

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="sdl2.nuget" version="2.24.2" targetFramework="native" /> <package id="sdl2.nuget" version="2.28.3" targetFramework="native" />
<package id="sdl2.nuget.redist" version="2.24.2" targetFramework="native" /> <package id="sdl2.nuget.redist" version="2.28.3" targetFramework="native" />
</packages> </packages>