diff options
author | endolf <[email protected]> | 2003-07-23 12:22:55 +0000 |
---|---|---|
committer | endolf <[email protected]> | 2003-07-23 12:22:55 +0000 |
commit | 4e023f726e4cd57a9e58679e92391bc5b9d25f61 (patch) | |
tree | 199d8d05cc5e1e9a99de120b95ea98c32ebf10fc /plugins/DX8/src | |
parent | e619c6ef3a393592df20b45e2b40cccee8794d3e (diff) |
Update to allow hat switches to be in 4 more positions.
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@12 e343933a-64c8-49c5-92b1-88f2ce3e89e8
Diffstat (limited to 'plugins/DX8/src')
-rw-r--r-- | plugins/DX8/src/java/net/java/games/input/DirectInputAxis.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/DX8/src/java/net/java/games/input/DirectInputAxis.java b/plugins/DX8/src/java/net/java/games/input/DirectInputAxis.java index 58df37d..e9cfc6e 100644 --- a/plugins/DX8/src/java/net/java/games/input/DirectInputAxis.java +++ b/plugins/DX8/src/java/net/java/games/input/DirectInputAxis.java @@ -155,12 +155,20 @@ class DirectInputAxis extends AbstractAxis { return Axis.POV.OFF; } else if (data == 0.0) { return Axis.POV.UP; + } else if (data == 4500) { + return Axis.POV.UP_RIGHT; } else if (data == 9000) { return Axis.POV.RIGHT; + } else if (data == 13500) { + return Axis.POV.DOWN_RIGHT; } else if (data == 18000) { return Axis.POV.DOWN; + } else if (data == 22500) { + return Axis.POV.DOWN_LEFT; } else if (data == 27000) { return Axis.POV.LEFT; + } else if (data == 31500) { + return Axis.POV.UP_LEFT; } else { System.err.print("Unexpected value for DX8 HAT: "+data); return Axis.POV.OFF; |