Skip Xbox pads when scanning for HID-Devices on windows. (We have XInput!)

This commit is contained in:
Maschell 2017-04-02 19:12:34 +02:00
parent 07443bca8a
commit 79f4d738de

View File

@ -70,6 +70,9 @@ public final class PureJavaHidApiManager {
for (HidDeviceInfo info : PureJavaHidApi.enumerateDevices()) { for (HidDeviceInfo info : PureJavaHidApi.enumerateDevices()) {
if (info.getUsagePage() == 0x05 ||info.getUsagePage() == 0x01 || info.getUsagePage() == 0x04 || (info.getVendorId() == 0x57e) || (info.getVendorId() == 0x054c)) { if (info.getUsagePage() == 0x05 ||info.getUsagePage() == 0x01 || info.getUsagePage() == 0x04 || (info.getVendorId() == 0x57e) || (info.getVendorId() == 0x054c)) {
if(((info.getVendorId() == 0x045e) && ((info.getProductId() == 0x02ff) || (info.getProductId() == 0x02a1))) && Settings.isWindows()){ //Skip Xbox pads on windows. We have XInput
continue;
}
connectedGamepads.add(info); connectedGamepads.add(info);
} }
} }