From: Shawn Rutledge Date: Tue, 6 Mar 2012 15:29:50 +0000 (+0100) Subject: Fix the bit test for ABS_MT_SLOT to detect protocol B X-Git-Tag: qt-v5.0.0-alpha1~516 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eddabd2395c6bf6516893d04c22e7fde2be9e1a1;p=profile%2Fivi%2Fqtbase.git Fix the bit test for ABS_MT_SLOT to detect protocol B I tested, it didn't work. This is from a previous patch I had already gotten working before 40a5ba4d3fccb449dcfd8d9a0deaf4c7f0fe12bc was submitted. Change-Id: I868f069fe834b3122ed9b5b3dc9af0781d6e1d0d Reviewed-by: Laszlo Agocs --- diff --git a/src/plugins/generic/evdevtouch/qevdevtouch.cpp b/src/plugins/generic/evdevtouch/qevdevtouch.cpp index 73f253a..9e63474 100644 --- a/src/plugins/generic/evdevtouch/qevdevtouch.cpp +++ b/src/plugins/generic/evdevtouch/qevdevtouch.cpp @@ -134,7 +134,7 @@ void QTouchScreenData::registerDevice() static inline bool testBit(long bit, const long *array) { - return array[bit / LONG_BITS] & (1 << (bit & (LONG_BITS - 1))); + return (array[bit / LONG_BITS] >> bit % LONG_BITS) & 1; } QTouchScreenHandler::QTouchScreenHandler(const QString &spec)