From 07d3247011cb08d3f1164047294e235d6e7b1bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 24 Jul 2005 11:59:28 +0000 Subject: [PATCH] Patch by Andrey Korotaev : Fix scrolling with mouse 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 | 2 ++ reactos/drivers/input/i8042prt/mouse.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/input/i8042prt/i8042prt.h b/reactos/drivers/input/i8042prt/i8042prt.h index 8ece980f023..03290663030 100644 --- a/reactos/drivers/input/i8042prt/i8042prt.h +++ b/reactos/drivers/input/i8042prt/i8042prt.h @@ -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 * --------------------------------------------------*/ diff --git a/reactos/drivers/input/i8042prt/mouse.c b/reactos/drivers/input/i8042prt/mouse.c index 052e0358708..50c429a413c 100644 --- a/reactos/drivers/input/i8042prt/mouse.c +++ b/reactos/drivers/input/i8042prt/mouse.c @@ -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) {