Skip to content

Commit

Permalink
Merge pull request #32 from jean-edouard/wheeldelta
Browse files Browse the repository at this point in the history
xeninp: use factors of WHEEL_DELTA for scrolls
  • Loading branch information
rossphilipson authored Jan 5, 2017
2 parents 98e7b84 + 1f57551 commit 8933def
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions input/xeninp/xeninp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions input/xeninp/xeninp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8933def

Please sign in to comment.