SDL_XINPUT_Enabled() returns false until XInput DLL is successfully loaded

We make sure we initialize XInput first, so that anything checking whether it's enabled gets a valid result based on whether we were able to load it or not.
This commit is contained in:
Sam Lantinga 2024-09-06 11:19:19 -07:00
parent 6da97c63da
commit 8f46cb771c
3 changed files with 5 additions and 6 deletions

View file

@ -61,7 +61,7 @@ static SDL_JoystickDriver *SDL_joystick_drivers[] = {
#if defined(SDL_JOYSTICK_DINPUT) || defined(SDL_JOYSTICK_XINPUT)
&SDL_WINDOWS_JoystickDriver,
#endif
#ifdef SDL_JOYSTICK_WGI
#ifdef SDL_JOYSTICK_WGI // Lower priority than other Windows drivers
&SDL_WGI_JoystickDriver,
#endif
#ifdef SDL_JOYSTICK_WINMM