Added Android support for the Hyperkin X91 and the SteelSeries Stratus Duo
authorSam Lantinga <slouken@libsdl.org>
Tue, 17 Dec 2019 12:03:57 -0800
changeset 13351472db3f71645
parent 13350 a9ce6aa098b6
child 13352 663428d994ab
Added Android support for the Hyperkin X91 and the SteelSeries Stratus Duo
android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
     1.1 --- a/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java	Mon Dec 16 17:11:23 2019 -0800
     1.2 +++ b/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java	Tue Dec 17 12:03:57 2019 -0800
     1.3 @@ -275,8 +275,9 @@
     1.4              0x06a3, // Saitek
     1.5              0x0738, // Mad Catz
     1.6              0x07ff, // Mad Catz
     1.7 -            0x0e6f, // Unknown
     1.8 +            0x0e6f, // PDP
     1.9              0x0f0d, // Hori
    1.10 +            0x1038, // SteelSeries
    1.11              0x11c9, // Nacon
    1.12              0x12ab, // Unknown
    1.13              0x1430, // RedOctane
    1.14 @@ -289,7 +290,8 @@
    1.15              0x24c6, // PowerA
    1.16          };
    1.17  
    1.18 -        if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
    1.19 +        if (usbInterface.getId() == 0 &&
    1.20 +            usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
    1.21              usbInterface.getInterfaceSubclass() == XB360_IFACE_SUBCLASS &&
    1.22              usbInterface.getInterfaceProtocol() == XB360_IFACE_PROTOCOL) {
    1.23              int vendor_id = usbDevice.getVendorId();
    1.24 @@ -308,13 +310,15 @@
    1.25          final int[] SUPPORTED_VENDORS = {
    1.26              0x045e, // Microsoft
    1.27              0x0738, // Mad Catz
    1.28 -            0x0e6f, // Unknown
    1.29 +            0x0e6f, // PDP
    1.30              0x0f0d, // Hori
    1.31              0x1532, // Razer Wildcat
    1.32              0x24c6, // PowerA
    1.33 +            0x2e24, // Hyperkin
    1.34          };
    1.35  
    1.36 -        if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
    1.37 +        if (usbInterface.getId() == 0 &&
    1.38 +            usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
    1.39              usbInterface.getInterfaceSubclass() == XB1_IFACE_SUBCLASS &&
    1.40              usbInterface.getInterfaceProtocol() == XB1_IFACE_PROTOCOL) {
    1.41              int vendor_id = usbDevice.getVendorId();