diff options
author | endolf <[email protected]> | 2007-06-28 20:37:24 +0000 |
---|---|---|
committer | endolf <[email protected]> | 2007-06-28 20:37:24 +0000 |
commit | 56e0e6811b57f4628810b47122ce302e3da4094b (patch) | |
tree | 19a2b4b1146c92b43c9922a3ca3d49980a68df1a /plugins/windows/src/java/net | |
parent | 8f42349adc3e5dd4998ad120c72386808c30be09 (diff) |
Make the API docs and the code match for the Mouse.get<button> methods. Add the methods that we actually wanted to be there.
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@189 e343933a-64c8-49c5-92b1-88f2ce3e89e8
Diffstat (limited to 'plugins/windows/src/java/net')
-rw-r--r-- | plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java | 2 | ||||
-rw-r--r-- | plugins/windows/src/java/net/java/games/input/RawMouse.java | 6 |
2 files changed, 4 insertions, 4 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 be452bc..5e31bad 100644 --- a/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java +++ b/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java @@ -166,7 +166,7 @@ public final class DirectInputEnvironmentPlugin extends ControllerEnvironment im private final Mouse createMouseFromDevice(IDirectInputDevice device) { Component[] components = createComponents(device, true); Mouse mouse = new DIMouse(device, components, new Controller[]{}, device.getRumblers()); - if (mouse.getX() != null && mouse.getY() != null && mouse.getLeft() != null) + if (mouse.getX() != null && mouse.getY() != null && mouse.getPrimaryButton() != null) return mouse; else return null; diff --git a/plugins/windows/src/java/net/java/games/input/RawMouse.java b/plugins/windows/src/java/net/java/games/input/RawMouse.java index e6fc324..57b6cc0 100644 --- a/plugins/windows/src/java/net/java/games/input/RawMouse.java +++ b/plugins/windows/src/java/net/java/games/input/RawMouse.java @@ -128,17 +128,17 @@ final class RawMouse extends Mouse { break; case EVENT_BUTTON_0: event_state = EVENT_BUTTON_1; - if (makeButtonEvent(current_event, event, getLeft(), RawDevice.RI_MOUSE_BUTTON_1_DOWN, RawDevice.RI_MOUSE_BUTTON_1_UP)) + if (makeButtonEvent(current_event, event, getPrimaryButton(), RawDevice.RI_MOUSE_BUTTON_1_DOWN, RawDevice.RI_MOUSE_BUTTON_1_UP)) return true; break; case EVENT_BUTTON_1: event_state = EVENT_BUTTON_2; - if (makeButtonEvent(current_event, event, getRight(), RawDevice.RI_MOUSE_BUTTON_2_DOWN, RawDevice.RI_MOUSE_BUTTON_2_UP)) + if (makeButtonEvent(current_event, event, getSecondaryButton(), RawDevice.RI_MOUSE_BUTTON_2_DOWN, RawDevice.RI_MOUSE_BUTTON_2_UP)) return true; break; case EVENT_BUTTON_2: event_state = EVENT_BUTTON_3; - if (makeButtonEvent(current_event, event, getMiddle(), RawDevice.RI_MOUSE_BUTTON_3_DOWN, RawDevice.RI_MOUSE_BUTTON_3_UP)) + if (makeButtonEvent(current_event, event, getTertiaryButton(), RawDevice.RI_MOUSE_BUTTON_3_DOWN, RawDevice.RI_MOUSE_BUTTON_3_UP)) return true; break; case EVENT_BUTTON_3: |