mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-18 17:28:13 +00:00
joystick: Move WGI driver initialization after Windows driver
WGI calls SDL_DINPUT_JoystickPresent() so we need to be sure DInput remains initialized for the lifetime of the WGI driver to avoid a crash or duplicated joysticks between DInput and WGI.
This commit is contained in:

committed by
Sam Lantinga

parent
d73bd0d2f6
commit
419ae29d90
@@ -56,12 +56,12 @@ static SDL_JoystickDriver *SDL_joystick_drivers[] = {
|
||||
#ifdef SDL_JOYSTICK_RAWINPUT /* Before WINDOWS_ driver, as WINDOWS wants to check if this driver is handling things */
|
||||
&SDL_RAWINPUT_JoystickDriver,
|
||||
#endif
|
||||
#if defined(SDL_JOYSTICK_DINPUT) || defined(SDL_JOYSTICK_XINPUT) /* Before WGI driver, as WGI wants to check if this driver is handling things */
|
||||
&SDL_WINDOWS_JoystickDriver,
|
||||
#endif
|
||||
#if defined(SDL_JOYSTICK_WGI)
|
||||
&SDL_WGI_JoystickDriver,
|
||||
#endif
|
||||
#if defined(SDL_JOYSTICK_DINPUT) || defined(SDL_JOYSTICK_XINPUT)
|
||||
&SDL_WINDOWS_JoystickDriver,
|
||||
#endif
|
||||
#if defined(SDL_JOYSTICK_WINMM)
|
||||
&SDL_WINMM_JoystickDriver,
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user