Patch by Andrey Korotaev <unC0Rr@inbox.ru>: Fix scrolling with mouse
authorHervé Poussineau <hpoussin@reactos.org>
Sun, 24 Jul 2005 11:59:28 +0000 (11:59 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Sun, 24 Jul 2005 11:59:28 +0000 (11:59 +0000)
This multiplication was deleted when replacing old psaux driver by i8042prt
Fixes bug #652

svn path=/trunk/; revision=16711

reactos/drivers/input/i8042prt/i8042prt.h
reactos/drivers/input/i8042prt/mouse.c

index 8ece980..0329066 100644 (file)
@@ -46,6 +46,8 @@ typedef struct _CONNECT_DATA {
 #define KEYBOARD_NUM_LOCK_ON 0x02
 #define KEYBOARD_CAPS_LOCK_ON 0x04
 
+#define WHEEL_DELTA 120
+
 /*-----------------------------------------------------
  *  DeviceExtension
  * --------------------------------------------------*/
index 052e035..50c429a 100644 (file)
@@ -489,7 +489,7 @@ VOID STDCALL I8042MouseHandle(PDEVICE_EXTENSION DevExt,
 
                if (Scroll) {
                        MouseInput->RawButtons |= MOUSE_WHEEL;
-                       MouseInput->ButtonData = (USHORT) Scroll;
+                       MouseInput->ButtonData = (USHORT)(Scroll * -WHEEL_DELTA);
                }
 
                if (DevExt->MouseType == IntellimouseExplorer) {