tslib: add patch to prevent double up events
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 4 Dec 2011 15:43:59 +0000 (17:43 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 4 Dec 2011 16:29:51 +0000 (18:29 +0200)
up events were reported twice: from touch release and event sync,
report only the later instead

recipes/tslib/tslib/no_double_up_event.patch [new file with mode: 0644]
recipes/tslib/tslib_1.0.bb

diff --git a/recipes/tslib/tslib/no_double_up_event.patch b/recipes/tslib/tslib/no_double_up_event.patch
new file mode 100644 (file)
index 0000000..b3ed6bb
--- /dev/null
@@ -0,0 +1,20 @@
+diff -urp tslib-1.0_/plugins/input-raw.c tslib-1.0/plugins/input-raw.c
+--- tslib-1.0_/plugins/input-raw.c     2011-12-04 17:32:22.474336001 +0200
++++ tslib-1.0/plugins/input-raw.c      2011-12-04 17:33:06.544336001 +0200
+@@ -95,15 +108,8 @@ static int ts_input_read(struct tslib_mo
+                       case EV_KEY:
+                               switch (ev.code) {
+                               case BTN_TOUCH:
+-                                      if (ev.value == 0) {
+-                                              /* pen up */
+-                                              samp->x = 0;
+-                                              samp->y = 0;
++                                      if (ev.value == 0)
+                                               samp->pressure = 0;
+-                                              samp->tv = ev.time;
+-                                              samp++;
+-                                              total++;
+-                                      }
+                                       break;
+                               }
+                               break;
index d5d9f0e..455953e 100644 (file)
@@ -5,9 +5,10 @@ SRC_URI = "http://download.berlios.de/tslib/${BP}.tar.bz2 \
            file://newer-libtool-fix.patch;patch=1 \
            file://add_lowpass_plugin.patch;patch=1 \
            file://lowpass.c \
+           file://no_double_up_event.patch;patch=1 \
 "
 
-PR = "${INC_PR}.6"
+PR = "${INC_PR}.7"
 
 do_configure_prepend() {
        cp ${WORKDIR}/lowpass.c ${S}/plugins/