mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2026-01-04 15:59:57 +01:00
Don't create devices that are of an unknown type, with no components
This commit is contained in:
parent
fd2a1b073d
commit
db12311aa5
|
|
@ -174,7 +174,10 @@ public final class DirectInputEnvironmentPlugin extends ControllerEnvironment im
|
|||
|
||||
private final AbstractController createControllerFromDevice(IDirectInputDevice device, Controller.Type type) {
|
||||
Component[] components = createComponents(device, false);
|
||||
AbstractController controller = new DIAbstractController(device, components, new Controller[]{}, device.getRumblers(), type);
|
||||
AbstractController controller = null;
|
||||
if(type == Controller.Type.UNKNOWN && components.length>0) {
|
||||
controller = new DIAbstractController(device, components, new Controller[]{}, device.getRumblers(), type);
|
||||
}
|
||||
return controller;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue