diff options
author | Sam Lantinga <slouken@libsdl.org> | 2018-08-29 20:55:02 -0700 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2018-08-29 20:55:02 -0700 |
commit | 694d830e0a46a7a9fda0c4423b61621cd0514ba1 (patch) | |
tree | 63b2813404e029149a7e3103a075c816f9f6c1c6 | |
parent | 8e80ef8321cbd6424c650c150b1569e731fb22c3 (diff) | |
download | sdl-694d830e0a46a7a9fda0c4423b61621cd0514ba1.tar.gz |
Don't show the Razer Raiju sound interface as a game controller
-rw-r--r-- | src/joystick/hidapi/SDL_hidapi_ps4.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/joystick/hidapi/SDL_hidapi_ps4.c b/src/joystick/hidapi/SDL_hidapi_ps4.c index 6dcdb6481..ffef9683a 100644 --- a/src/joystick/hidapi/SDL_hidapi_ps4.c +++ b/src/joystick/hidapi/SDL_hidapi_ps4.c @@ -216,9 +216,11 @@ 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) { - /* The Revolution Pro Controller exposes multiple interfaces on Windows */ + /* The Revolution Pro Controller and Razer Raiju expose multiple interfaces on Windows */ const Uint16 NACON_USB_VID = 0x146b; - if (vendor_id == NACON_USB_VID && usage_page != 0 && usage_page != 1) { + 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; } |