summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPing Cheng <pinglinux@gmail.com>2012-12-04 14:51:05 -0800
committerPeter Hutterer <peter.hutterer@who-t.net>2012-12-06 15:59:06 +1000
commit2b285d01e1c03b51a8526516acda208edbeeac89 (patch)
treed9f1718963e3174cd126b73e8a655e06169d8881
parenta82f0251e400b98b0044f2c8ab89c4b61ec99d4f (diff)
downloadxf86-input-wacom-2b285d01e1c03b51a8526516acda208edbeeac89.tar.gz
Update resoltuion for old kernels
We upscaled resolutions in WacomModelDesc and reported from absinfos. But we forgot to update them for older kernels that do not support resolution in absinfo. Resolution received from kernel is in hundredths of a mm. The scale we use here is in meter. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/wcmUSB.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index acce5ee..5e6189c 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -572,7 +572,7 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
{
if (is_touch)
common->wcmTouchResolX =
- (int)(((double)common->wcmMaxTouchX * 10.0
+ (int)(((double)common->wcmMaxTouchX * 100000.0
/ (double)absinfo.maximum) + 0.5);
else
common->wcmMaxStripX = absinfo.maximum;
@@ -661,7 +661,7 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
{
if (is_touch)
common->wcmTouchResolY =
- (int)(((double)common->wcmMaxTouchY * 10.0
+ (int)(((double)common->wcmMaxTouchY * 100000.0
/ (double)absinfo.maximum) + 0.5);
else
common->wcmMaxStripY = absinfo.maximum;