diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2011-01-24 11:49:05 -0500 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-01-25 11:34:24 +1000 |
commit | 768c25a99b2f4ec07993eb15a0f05a5e22b5c695 (patch) | |
tree | e150c697f560ca357cd00c2fbddde9ad1a05eada /src/emuWheel.c | |
parent | b5c9f41b2b6c680b7c44eadef8da855b1d9adcb7 (diff) |
Add support for masked valuators
With the X server now supporting masked valuators for XI2, enable
support in X evdev.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/emuWheel.c')
-rw-r--r-- | src/emuWheel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/emuWheel.c b/src/emuWheel.c index 81ef2a3..715f8d1 100644 --- a/src/emuWheel.c +++ b/src/emuWheel.c @@ -118,8 +118,9 @@ EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct input_event *pEv) /* We don't want to intercept real mouse wheel events */ if(pEv->type == EV_ABS) { - oldValue = pEvdev->vals[pEvdev->axis_map[pEv->code]]; - pEvdev->vals[pEvdev->axis_map[pEv->code]] = value; + int axis = pEvdev->axis_map[pEv->code]; + oldValue = valuator_mask_get(pEvdev->vals, axis); + valuator_mask_set(pEvdev->vals, axis, value); value -= oldValue; /* make value into a differential measurement */ } |