Don't show the Razer Raiju sound interface as a game controller
authorSam Lantinga <slouken@libsdl.org>
Wed, 29 Aug 2018 20:55:02 -0700
changeset 12165c7e321efcbab
parent 12164 8b71c22d6714
child 12166 e06f24ebeb69
Don't show the Razer Raiju sound interface as a game controller
src/joystick/hidapi/SDL_hidapi_ps4.c
     1.1 --- a/src/joystick/hidapi/SDL_hidapi_ps4.c	Wed Aug 29 20:23:42 2018 -0700
     1.2 +++ b/src/joystick/hidapi/SDL_hidapi_ps4.c	Wed Aug 29 20:55:02 2018 -0700
     1.3 @@ -216,9 +216,11 @@
     1.4  static SDL_bool
     1.5  HIDAPI_DriverPS4_IsSupportedDevice(Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, Uint16 usage_page, Uint16 usage)
     1.6  {
     1.7 -    /* The Revolution Pro Controller exposes multiple interfaces on Windows */
     1.8 +    /* The Revolution Pro Controller and Razer Raiju expose multiple interfaces on Windows */
     1.9      const Uint16 NACON_USB_VID = 0x146b;
    1.10 -    if (vendor_id == NACON_USB_VID && usage_page != 0 && usage_page != 1) {
    1.11 +    const Uint16 RAZER_USB_VID = 0x1532;
    1.12 +    if ((vendor_id == NACON_USB_VID || vendor_id == RAZER_USB_VID) &&
    1.13 +        (usage_page != 0 && usage_page != 1)) {
    1.14          return SDL_FALSE;
    1.15      }
    1.16