|
From: Elias N. <eli...@us...> - 2004-09-22 18:03:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28826/src/java/org/lwjgl/test/input Modified Files: HWCursorTest.java MouseTest.java Log Message: Fix Mouse tests Index: HWCursorTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input/HWCursorTest.java,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- HWCursorTest.java 22 Jul 2004 14:56:39 -0000 1.36 +++ HWCursorTest.java 22 Sep 2004 18:03:10 -0000 1.37 @@ -279,7 +279,8 @@ mouse_y = Mouse.getY(); while(Mouse.next()) { - if(Mouse.getEventButtonState() && Mouse.getEventButton() < 3) { + int button = Mouse.getEventButton(); + if(button >= 0 && button < 3 && Mouse.getEventButtonState()) { mouse_btn = Mouse.getEventButton(); } } Index: MouseTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input/MouseTest.java,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- MouseTest.java 17 Sep 2004 05:56:10 -0000 1.40 +++ MouseTest.java 22 Sep 2004 18:03:10 -0000 1.41 @@ -240,7 +240,7 @@ private void readBufferedMouse() { // iterate all events, use the last button down while(Mouse.next()) { - if(Mouse.getEventButtonState()) { + if(Mouse.getEventButton() != -1 && Mouse.getEventButtonState()) { lastButton = Mouse.getEventButton(); } } |