From cdf4a0850e34e8201ba53b1e2316e5893a2d8835 Mon Sep 17 00:00:00 2001 From: Boomslangnz Date: Mon, 11 Sep 2023 19:10:50 +1200 Subject: [PATCH] Update SDL2 and tweak init --- Dinput8Wrapper.vcxproj | 8 ++++---- DllMain.cpp | 4 +--- Version.txt | 2 +- packages.config | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Dinput8Wrapper.vcxproj b/Dinput8Wrapper.vcxproj index 7abfbfb..92ac917 100644 --- a/Dinput8Wrapper.vcxproj +++ b/Dinput8Wrapper.vcxproj @@ -455,14 +455,14 @@ cd $(OutDir) &amp;&amp; for /D /r %d in (.\Deploy\*) do @xcopy *.dll %d\ - - + + 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}. - - + + \ No newline at end of file diff --git a/DllMain.cpp b/DllMain.cpp index f6654b0..2dc12d8 100644 --- a/DllMain.cpp +++ b/DllMain.cpp @@ -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]; diff --git a/Version.txt b/Version.txt index 5a687ed..2f4760a 100644 --- a/Version.txt +++ b/Version.txt @@ -1 +1 @@ -v2.0.0.33 \ No newline at end of file +v2.0.0.34 \ No newline at end of file diff --git a/packages.config b/packages.config index 962771d..0010244 100644 --- a/packages.config +++ b/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file