From 470ea4a7dcb2877a803714af24d91a9680f8bb0a Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Mon, 24 Feb 2003 19:46:52 +0000 Subject: [PATCH] linux scroller now match win32 behaviour more precisely - scrolling reversed and scaled 120 --- src/native/linux/org_lwjgl_input_Mouse.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/native/linux/org_lwjgl_input_Mouse.cpp b/src/native/linux/org_lwjgl_input_Mouse.cpp index 1693d177..91b755e8 100644 --- a/src/native/linux/org_lwjgl_input_Mouse.cpp +++ b/src/native/linux/org_lwjgl_input_Mouse.cpp @@ -51,6 +51,8 @@ #define POINTER_WARP_BORDER 10 #define WARP_RETRY 5 +// scale the mouse wheel according to win32 +#define WHEEL_SCALE 120 extern Display *disp; extern Window win; @@ -217,10 +219,10 @@ void handleButtonPress(XButtonEvent *event) { buttons[2] = JNI_TRUE; break; case Button4: - current_z--; + current_z += WHEEL_SCALE; break; case Button5: - current_z++; + current_z -= WHEEL_SCALE; break; default: assert(0); }