summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-07-18 09:45:56 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-07-18 10:28:40 +1000
commit4f1041122f1544b660f80b5a9aad086a3f6da372 (patch)
tree32577084824817aa1ffaddf163e48190b65f8ddc /include
parent983185c64b9fa725519ff5a1e0863e7bac00bea4 (diff)
downloadxf86-input-wacom-4f1041122f1544b660f80b5a9aad086a3f6da372.tar.gz
isdv4: fix pressure parsing
Missing shift would report the wrong pressure maximum. Reported-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Diffstat (limited to 'include')
-rw-r--r--include/isdv4.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/isdv4.h b/include/isdv4.h
index 606ef01..539f609 100644
--- a/include/isdv4.h
+++ b/include/isdv4.h
@@ -118,7 +118,7 @@ static int isdv4ParseQuery(const unsigned char *buffer, const size_t len,
/* FIXME: big endian? */
reply->x_max = (buffer[1] << 9) | (buffer[2] << 2) | ((buffer[6] >> 5) & 0x3);
reply->y_max = (buffer[3] << 9) | (buffer[4] << 2) | ((buffer[6] >> 3) & 0x3);
- reply->pressure_max = buffer[5] | (buffer[6] & 0x7);
+ reply->pressure_max = (buffer[6] & 0x7) << 7 | buffer[5];
reply->tilt_y_max = buffer[7];
reply->tilt_x_max = buffer[8];
reply->version = buffer[9] << 7 | buffer[10];