diff options
Diffstat (limited to 'plugins/OSX')
-rwxr-xr-x | plugins/OSX/src/java/net/java/games/input/OSXEnvironmentPlugin.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/OSX/src/java/net/java/games/input/OSXEnvironmentPlugin.java b/plugins/OSX/src/java/net/java/games/input/OSXEnvironmentPlugin.java index 1e3df64..41a28fc 100755 --- a/plugins/OSX/src/java/net/java/games/input/OSXEnvironmentPlugin.java +++ b/plugins/OSX/src/java/net/java/games/input/OSXEnvironmentPlugin.java @@ -422,14 +422,17 @@ public class OSXEnvironmentPlugin extends ControllerEnvironment implements Plugi boolean hasPreferredState, boolean hasNullState) { - InputControllerElement element = new InputControllerElement( elementCookie, usagePage, usage, usagePage, + InputControllerElement element = new InputControllerElement( elementCookie, elementType, usage, usagePage, rawMin, rawMax, scaledMin, scaledMax, dataBitSize, isRelative, isWrapping, isNonLinear, hasPreferredState, hasNullState ); InputController inputController = (InputController)devices.get( new Long( lpDevice) ); - inputController.addControllerElement( element ); + if ( inputController != null ) + { + inputController.addControllerElement( element ); + } } |