mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 23:48:29 +00:00
Generalized the raw input controller driver and moved XInput/WGI detection into it for XInput devices
This fixes bad report parsing for various newer Xbox controllers, and this driver is now preferred over XInput, since it handles more than 4 controllers.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "SDL_events.h"
|
||||
#include "../SDL_sysjoystick.h"
|
||||
#include "../hidapi/SDL_hidapijoystick_c.h"
|
||||
#include "SDL_rawinputjoystick_c.h"
|
||||
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
#define COBJMACROS
|
||||
@@ -247,6 +248,12 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeAdde
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SDL_JOYSTICK_RAWINPUT
|
||||
if (!ignore_joystick && RAWINPUT_IsDevicePresent(vendor, product, version)) {
|
||||
ignore_joystick = SDL_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!ignore_joystick && SDL_DINPUT_JoystickPresent(vendor, product, version)) {
|
||||
ignore_joystick = SDL_TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user