The GameInput driver handles Xbox controllers
Don't let the raw input driver handle them when GameInput is active
This commit is contained in:
parent
698b7deaa2
commit
eb9a7d97f9
1 changed files with 7 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
|||
#ifdef SDL_JOYSTICK_GAMEINPUT
|
||||
|
||||
#include "../SDL_sysjoystick.h"
|
||||
#include "../usb_ids.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#define COBJMACROS
|
||||
|
@ -281,6 +282,12 @@ static SDL_bool GAMEINPUT_JoystickIsDevicePresent(Uint16 vendor_id, Uint16 produ
|
|||
int idx = 0;
|
||||
GAMEINPUT_InternalDevice *elem = NULL;
|
||||
|
||||
if (vendor_id == USB_VENDOR_MICROSOFT &&
|
||||
product_id == USB_PRODUCT_XBOX_ONE_XBOXGIP_CONTROLLER) {
|
||||
/* The Xbox One controller shows up as a hardcoded raw input VID/PID, which we definitely handle */
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
for (idx = 0; idx < g_GameInputList.count; ++idx) {
|
||||
elem = g_GameInputList.devices[idx];
|
||||
if (elem && vendor_id == elem->vendor && product_id == elem->product) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue