Update of /cvsroot/java-game-lib/LWJGL/src/native/linux
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22065/src/native/linux
Modified Files:
org_lwjgl_input_Mouse.c
Log Message:
Updated win32 to report Mouse deltas
Index: org_lwjgl_input_Mouse.c
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Mouse.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- org_lwjgl_input_Mouse.c 22 Sep 2004 11:08:21 -0000 1.9
+++ org_lwjgl_input_Mouse.c 22 Sep 2004 15:06:26 -0000 1.10
@@ -65,7 +65,6 @@
static int dz;
static int last_x;
static int last_y;
-static int last_z;
static jbyte buttons[NUM_BUTTONS];
static event_queue_t event_queue;
static bool buffer_enabled;
@@ -84,14 +83,12 @@
}
static void setCursorPos(int x, int y) {
- int current_x = x;
- int current_y = y;
- jint event_dx = current_x - last_x;
- jint event_dy = current_y - last_y;
+ jint event_dx = x - last_x;
+ jint event_dy = y - last_y;
dx += event_dx;
dy += event_dy;
- last_x = current_x;
- last_y = current_y;
+ last_x = x;
+ last_y = y;
putEvent(-1, 0, event_dx, -event_dy, 0);
}
@@ -245,7 +242,7 @@
if (disp == NULL)
return;
int i;
- last_z = last_y = last_x = dx = dy = dz = 0;
+ last_y = last_x = dx = dy = dz = 0;
for (i = 0; i < NUM_BUTTONS; i++)
buttons[i] = 0;
if (!blankCursor()) {
|