tslib: Include patch to make it work with all drivers that don't supply pressure...
authorFlorian Boor <florian.boor@kernelconcepts.de>
Tue, 21 Jul 2009 13:15:05 +0000 (15:15 +0200)
committerFlorian Boor <florian.boor@kernelconcepts.de>
Tue, 21 Jul 2009 13:21:10 +0000 (15:21 +0200)
recipes/tslib/tslib/tslib-nopressure.patch [new file with mode: 0644]
recipes/tslib/tslib_1.0.bb

diff --git a/recipes/tslib/tslib/tslib-nopressure.patch b/recipes/tslib/tslib/tslib-nopressure.patch
new file mode 100644 (file)
index 0000000..1b19b43
--- /dev/null
@@ -0,0 +1,30 @@
+diff -ur tslib-1.0/plugins/input-raw.c tslib/plugins/input-raw.c
+--- tslib-1.0/plugins/input-raw.c      2006-08-24 23:02:54.000000000 +0200
++++ tslib/plugins/input-raw.c  2009-07-21 00:54:29.000000000 +0200
+@@ -95,7 +95,11 @@
+                       case EV_KEY:
+                               switch (ev.code) {
+                               case BTN_TOUCH:
+-                                      if (ev.value == 0) {
++                                      if (ev.value) {
++                                              samp->x = i->current_x;
++                                              samp->y = i->current_y;
++                                              samp->pressure = i->current_p = 1;
++                                      } else {
+                                               /* pen up */
+                                               samp->x = 0;
+                                               samp->y = 0;
+@@ -198,7 +202,11 @@
+                       } else if (ev.type == EV_KEY) {
+                               switch (ev.code) {
+                               case BTN_TOUCH:
+-                                      if (ev.value == 0) {
++                                      if (ev.value) {
++                                              samp->x = i->current_x;
++                                              samp->y = i->current_y;
++                                              samp->pressure = i->current_p = 1;
++                                      } else {
+                                               /* pen up */
+                                               samp->x = 0;
+                                               samp->y = 0;
+
index c22256f..1929ee0 100644 (file)
@@ -1,5 +1,6 @@
 SRC_URI = "http://download.berlios.de/tslib/${BP}.tar.bz2 \
-           file://fix_version.patch;patch=1"
-PR = "${INC_PR}.1"
+           file://fix_version.patch;patch=1 \
+           file://tslib-nopressure.patch;patch=1"
+PR = "${INC_PR}.2"
 
 include tslib.inc