|
From: <sp...@us...> - 2010-04-01 15:05:40
|
Revision: 3303
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3303&view=rev
Author: spasi
Date: 2010-04-01 15:05:32 +0000 (Thu, 01 Apr 2010)
Log Message:
-----------
Fix for grabbed mouse deltas.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2010-03-31 23:56:24 UTC (rev 3302)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2010-04-01 15:05:32 UTC (rev 3303)
@@ -542,19 +542,17 @@
if (getForegroundWindow() != hwnd && !hasParent)
return;
getGlobalClientRect(hwnd, rect);
- /* -- This is wrong on multi-monitor setups
int local_offset_x = rect.left;
int local_offset_y = rect.top;
+ /* -- This is wrong on multi-monitor setups
getGlobalClientRect(getDesktopWindow(), rect2);
Rect.intersect(rect, rect2, rect);
+ */
int center_x = (rect.left + rect.right)/2;
int center_y = (rect.top + rect.bottom)/2;
nSetCursorPosition(center_x, center_y);
int local_x = center_x - local_offset_x;
int local_y = center_y - local_offset_y;
- */
- int local_x = (rect.right - rect.left) / 2;
- int local_y = (rect.bottom - rect.top) / 2;
if (current_display != null)
current_display.setMousePosition(local_x, transformY(hwnd, local_y));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|