|
From: <ka...@us...> - 2011-08-13 18:54:00
|
Revision: 3611
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3611&view=rev
Author: kappa1
Date: 2011-08-13 18:53:54 +0000 (Sat, 13 Aug 2011)
Log Message:
-----------
Fix issue with Mouse getWidth/getHeight values being wrongly clipped when using Display.setParent(), thx to MatthiasM for finding this.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java
Modified: trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java 2011-08-13 17:20:59 UTC (rev 3610)
+++ trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java 2011-08-13 18:53:54 UTC (rev 3611)
@@ -362,8 +362,8 @@
y = poll_coord2;
}
if(clipMouseCoordinatesToWindow) {
- x = Math.min(implementation.getWidth() - 1, Math.max(0, x));
- y = Math.min(implementation.getHeight() - 1, Math.max(0, y));
+ x = Math.min(Display.getWidth() - 1, Math.max(0, x));
+ y = Math.min(Display.getHeight() - 1, Math.max(0, y));
}
dwheel += poll_dwheel;
read();
@@ -453,8 +453,8 @@
last_event_raw_y = new_event_y;
}
if(clipMouseCoordinatesToWindow) {
- event_x = Math.min(implementation.getWidth() - 1, Math.max(0, event_x));
- event_y = Math.min(implementation.getHeight() - 1, Math.max(0, event_y));
+ event_x = Math.min(Display.getWidth() - 1, Math.max(0, event_x));
+ event_y = Math.min(Display.getHeight() - 1, Math.max(0, event_y));
}
event_dwheel = readBuffer.getInt();
event_nanos = readBuffer.getLong();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|