Thomas Kho : winex11: Use correct multiplier for negative relative mouse movements.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 10 07:12:13 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 4598c973b22bb7d7bd4436866d29e86ef3e0644d
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=4598c973b22bb7d7bd4436866d29e86ef3e0644d

Author: Thomas Kho <tkho at ucla.edu>
Date:   Fri Jul  7 21:05:14 2006 -0500

winex11: Use correct multiplier for negative relative mouse movements.

---

 dlls/winex11.drv/mouse.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 01dcc59..f4d3e6b 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -255,15 +255,15 @@ void X11DRV_send_mouse_input( HWND hwnd,
         /* dx and dy can be negative numbers for relative movements */
         SystemParametersInfoW(SPI_GETMOUSE, 0, accel, 0);
 
-        if (x > accel[0] && accel[2] != 0)
+        if (abs(x) > accel[0] && accel[2] != 0)
         {
             xMult = 2;
-            if ((x > accel[1]) && (accel[2] == 2)) xMult = 4;
+            if ((abs(x) > accel[1]) && (accel[2] == 2)) xMult = 4;
         }
-        if (y > accel[0] && accel[2] != 0)
+        if (abs(y) > accel[0] && accel[2] != 0)
         {
             yMult = 2;
-            if ((y > accel[1]) && (accel[2] == 2)) yMult = 4;
+            if ((abs(y) > accel[1]) && (accel[2] == 2)) yMult = 4;
         }
 
         wine_tsx11_lock();




More information about the wine-cvs mailing list