From 2dffd217b112c346c6c0b07e82cb069a3cf84246 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 9 May 2013 13:31:38 +1000 Subject: Don't init abswheel2 valuator (7th val) if we don't have one InitValuatorAxisStruct() will return if the axisnum > num_axes and not initialise anything which is why the current code worked without issues. With a new patch to the server this will now complain with an error message to the log. Signed-off-by: Peter Hutterer Reviewed-by: Ping Cheng --- src/xf86Wacom.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c index 5289292..6ecf036 100644 --- a/src/xf86Wacom.c +++ b/src/xf86Wacom.c @@ -296,20 +296,21 @@ static int wcmInitAxes(DeviceIntPtr pWcm) /* seventh valuator: abswheel2 */ - index = 6; - label = None; - mode = Absolute; - min_res = max_res = res = 1; - min = 0; - max = 1; - if ((TabletHasFeature(common, WCM_DUALRING)) && IsPad(priv)) - { /* XXX: what is this axis label? */ + { + /* XXX: what is this axis label? */ + index = 6; + label = None; + mode = Absolute; + min_res = max_res = res = 1; + min = 0; + max = 1; + min = MIN_PAD_RING; max = MAX_PAD_RING; - } - wcmInitAxis(pInfo->dev, index, label, min, max, res, min_res, max_res, mode); + wcmInitAxis(pInfo->dev, index, label, min, max, res, min_res, max_res, mode); + } return TRUE; } -- cgit v1.2.3