From 1504e95a7d8e8182ace6189c5d173da2a306d601 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 17 Jul 2014 15:06:05 -0600 Subject: NxWM: Increase default priority of mouse and keyboard listener threads. Does not seem to make any difference but still seems like a good idea --- NxWidgets/nxwm/src/ctouchscreen.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'NxWidgets/nxwm/src') diff --git a/NxWidgets/nxwm/src/ctouchscreen.cxx b/NxWidgets/nxwm/src/ctouchscreen.cxx index 68fec4e5b..545405b81 100644 --- a/NxWidgets/nxwm/src/ctouchscreen.cxx +++ b/NxWidgets/nxwm/src/ctouchscreen.cxx @@ -363,10 +363,12 @@ FAR void *CTouchscreen::listener(FAR void *arg) #endif } - // On a truly success read, the size of the returned data will - // be exactly the size of one touchscreen sample + // On a truly successful read, the size of the returned data will + // be greater than or equal to size of one touchscreen sample. It + // be greater only in the case of a multi-touch touchscreen device + // when multi-touches are reported. - else if (nbytes == sizeof(struct touch_sample_s)) + else if (nbytes >= (ssize_t)sizeof(struct touch_sample_s)) { // Looks like good touchscreen input... process it @@ -375,7 +377,7 @@ FAR void *CTouchscreen::listener(FAR void *arg) else { dbg("ERROR Unexpected read size=%d, expected=%d\n", - nbytes, sizeof(struct touch_sample_s)); + nbytes, sizeof(struct touch_sample_s)); } } -- cgit v1.2.3