mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 09:26:25 +00:00
Better fix to make sure we're only returning controllers from the HIDAPI joystick API
This commit is contained in:
@@ -214,16 +214,8 @@ static uint8_t GetPlaystationVolumeFromFloat(float fVolume)
|
||||
}
|
||||
|
||||
static SDL_bool
|
||||
HIDAPI_DriverPS4_IsSupportedDevice(Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, Uint16 usage_page, Uint16 usage)
|
||||
HIDAPI_DriverPS4_IsSupportedDevice(Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number)
|
||||
{
|
||||
/* The Revolution Pro Controller and Razer Raiju expose multiple interfaces on Windows */
|
||||
const Uint16 NACON_USB_VID = 0x146b;
|
||||
const Uint16 RAZER_USB_VID = 0x1532;
|
||||
if ((vendor_id == NACON_USB_VID || vendor_id == RAZER_USB_VID) &&
|
||||
(usage_page != 0 && usage_page != 1)) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
return SDL_IsJoystickPS4(vendor_id, product_id);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user