From 1f5755193758efc144ff48cde4e47886026dae76 Mon Sep 17 00:00:00 2001 From: Jed Date: Wed, 4 Jan 2017 11:17:15 -0500 Subject: [PATCH] xeninp: use factors of WHEEL_DELTA for scrolls OXT-882 Signed-off-by: Jed --- input/xeninp/xeninp.c | 4 ++-- input/xeninp/xeninp.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/input/xeninp/xeninp.c b/input/xeninp/xeninp.c index 0d03af0..08b1a1f 100644 --- a/input/xeninp/xeninp.c +++ b/input/xeninp/xeninp.c @@ -192,12 +192,12 @@ XenInpEventConvert(PMOUSE_INPUT_DATA pMouInpData, PXENMOU_EVENT pMouEvent) else if (XENMOU_TEST_FLAG(pMouEvent->RevFlags, XMOU_FLAG_HWHEEL)) { pMouInpData->ButtonFlags = MOUSE_HWHEEL; - pMouInpData->ButtonData = XENMOU_GET_WDATA(pMouEvent->Data); + pMouInpData->ButtonData = XENMOU_GET_WDATA(pMouEvent->Data) * WHEEL_DELTA; } else if (XENMOU_TEST_FLAG(pMouEvent->RevFlags, XMOU_FLAG_VWHEEL)) { pMouInpData->ButtonFlags = MOUSE_WHEEL; - pMouInpData->ButtonData = XENMOU_GET_WDATA(pMouEvent->Data); + pMouInpData->ButtonData = XENMOU_GET_WDATA(pMouEvent->Data) * WHEEL_DELTA; } else return FALSE; diff --git a/input/xeninp/xeninp.h b/input/xeninp/xeninp.h index 486144c..275f543 100644 --- a/input/xeninp/xeninp.h +++ b/input/xeninp/xeninp.h @@ -15,6 +15,8 @@ #define MOUSE_NUMBER_OF_BUTTONS 2 #define MOUSE_SAMPLE_RATE 60 +#define WHEEL_DELTA 120 + typedef struct _XENINP_DEVICE_EXTENSION { // A backpointer to the device object for which this is the extension