diff options
author | gregorypierce <[email protected]> | 2003-08-09 18:18:43 +0000 |
---|---|---|
committer | gregorypierce <[email protected]> | 2003-08-09 18:18:43 +0000 |
commit | 3a034959f77e0d910cf8de0bef1d48d5db98545f (patch) | |
tree | a152755959c4ec335f5b6b2c79c4c5c56c50c16b /plugins/OSX | |
parent | 251facffa4009af1aed8a5575187c9ed1496d0c8 (diff) |
Change to ignore non HID compliant devices and to correct a bug where usage page passed as element type
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@44 e343933a-64c8-49c5-92b1-88f2ce3e89e8
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 ); + } } |