diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c index f334c00b2..8f01474b5 100644 --- a/src/joystick/windows/SDL_dinputjoystick.c +++ b/src/joystick/windows/SDL_dinputjoystick.c @@ -238,7 +238,12 @@ SDL_IsXInputDevice(Uint16 vendor_id, Uint16 product_id, const char* hidPath) { SDL_GameControllerType type; - if (!SDL_XINPUT_Enabled()) { + /* XInput and RawInput backends will pick up XInput-compatible devices */ + if (!SDL_XINPUT_Enabled() +#ifdef SDL_JOYSTICK_RAWINPUT + && !RAWINPUT_IsEnabled() +#endif + ) { return SDL_FALSE; } diff --git a/src/joystick/windows/SDL_windows_gaming_input.c b/src/joystick/windows/SDL_windows_gaming_input.c index af623c8ca..6d7e1d7ca 100644 --- a/src/joystick/windows/SDL_windows_gaming_input.c +++ b/src/joystick/windows/SDL_windows_gaming_input.c @@ -98,7 +98,12 @@ SDL_IsXInputDevice(Uint16 vendor, Uint16 product) UINT i, raw_device_count = 0; LONG vidpid = MAKELONG(vendor, product); - if (!SDL_XINPUT_Enabled()) { + /* XInput and RawInput backends will pick up XInput-compatible devices */ + if (!SDL_XINPUT_Enabled() +#ifdef SDL_JOYSTICK_RAWINPUT + && !RAWINPUT_IsEnabled() +#endif + ) { return SDL_FALSE; }