From 4d1e1aea077c0283808e2a1d8120a0eca85f2da7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 17 Nov 2010 09:05:10 +1000 Subject: Specify Valuator modes on initialization. Signed-off-by: Peter Hutterer --- src/xf86HyperPen.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/xf86HyperPen.c b/src/xf86HyperPen.c index b132b65..0e722da 100644 --- a/src/xf86HyperPen.c +++ b/src/xf86HyperPen.c @@ -648,7 +648,8 @@ xf86HypOpenDevice(DeviceIntPtr pHyp) priv->hypXSize, /* max val */ LPI2CPM(priv->hypRes), /* resolution */ 0, /* min_res */ - LPI2CPM(priv->hypRes)); /* max_res */ + LPI2CPM(priv->hypRes), /* max_res */ + (priv->flags & ABSOLUTE_FLAG)? Absolute : Relative); InitValuatorAxisStruct(pHyp, 1, axis_labels[1], @@ -656,7 +657,8 @@ xf86HypOpenDevice(DeviceIntPtr pHyp) priv->hypYSize, /* max val */ LPI2CPM(priv->hypRes), /* resolution */ 0, /* min_res */ - LPI2CPM(priv->hypRes)); /* max_res */ + LPI2CPM(priv->hypRes), /* max_res */ + (priv->flags & ABSOLUTE_FLAG)? Absolute : Relative); InitValuatorAxisStruct(pHyp, 2, axis_labels[2], @@ -664,7 +666,8 @@ xf86HypOpenDevice(DeviceIntPtr pHyp) 511, /* max val */ 512, /* resolution */ 0, /* min_res */ - 512); /* max_res */ + 512, /* max_res */ + (priv->flags & ABSOLUTE_FLAG)? Absolute : Relative); return (pInfo->fd != -1); } -- cgit v1.2.3