mirror of
https://github.com/Maschell/HIDtoVPADNetworkClient.git
synced 2024-11-14 19:05:05 +01:00
Add filtering for XInput devices
This commit is contained in:
parent
39e8459840
commit
61c7cb31a2
@ -167,6 +167,8 @@ public final class ControllerManager {
|
||||
|
||||
private static Map<String, ControllerType> detectXInputControllers() {
|
||||
Map<String, ControllerType> result = new HashMap<String, ControllerType>();
|
||||
if (!Settings.ControllerFiltering.getFilterState(Settings.ControllerFiltering.Type.XINPUT)) return result;
|
||||
|
||||
ControllerType type = ControllerType.XINPUT13;
|
||||
|
||||
// Try and catch missing C++ redist
|
||||
|
@ -211,7 +211,8 @@ public final class Settings {
|
||||
HIDKEYBOARD (1, "HID Keyboards", Platform.LINUX.mask | Platform.MAC_OS_X.mask),
|
||||
HIDMOUSE (2, "HID Mice", Platform.LINUX.mask | Platform.MAC_OS_X.mask),
|
||||
HIDOTHER (3, "Other HIDs", Platform.LINUX.mask | Platform.WINDOWS.mask | Platform.MAC_OS_X.mask),
|
||||
LINUX (4, "Linux controllers", Platform.LINUX.mask);
|
||||
LINUX (4, "Linux controllers", Platform.LINUX.mask),
|
||||
XINPUT (5, "XInput controllers", Platform.WINDOWS.mask);
|
||||
|
||||
private int index;
|
||||
@Getter private String name;
|
||||
@ -253,6 +254,7 @@ public final class Settings {
|
||||
filterStates[Type.HIDMOUSE.index] = false;
|
||||
filterStates[Type.HIDOTHER.index] = false;
|
||||
filterStates[Type.LINUX.index] = true;
|
||||
filterStates[Type.XINPUT.index] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user