aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java b/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java
index 5e31bad..d61748e 100644
--- a/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java
+++ b/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java
@@ -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;
}