mirror of
https://github.com/linux-sunxi/meta-sunxi.git
synced 2024-12-26 13:08:21 +01:00
tslib git bbappend: make it work with the tslib_git.bb in meta-openembedded/danny
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
parent
4e1be83791
commit
bd4713680b
@ -0,0 +1,79 @@
|
|||||||
|
From c525c0b5d8eada982c99442454fcf7b8364e10b3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Florian Boor <florian@kernelconcepts.de>
|
||||||
|
Date: Fri, 1 Apr 2011 23:30:21 +0200
|
||||||
|
Subject: [PATCH] Support reading coordinates from multitouch devices.
|
||||||
|
|
||||||
|
Signed-off-by: Florian Boor <florian@kernelconcepts.de>
|
||||||
|
Signed-off-by: Christopher Larson <kergoth@gmail.com>
|
||||||
|
---
|
||||||
|
plugins/input-raw.c | 33 +++++++++++++++++++++++----------
|
||||||
|
1 file changed, 23 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/input-raw.c b/plugins/input-raw.c
|
||||||
|
index 4396eab..1e48505 100644
|
||||||
|
--- a/plugins/input-raw.c
|
||||||
|
+++ b/plugins/input-raw.c
|
||||||
|
@@ -40,6 +40,11 @@
|
||||||
|
# define KEY_CNT (KEY_MAX+1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifndef ABS_MT_POSITION_X
|
||||||
|
+# define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */
|
||||||
|
+# define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#include "tslib-private.h"
|
||||||
|
|
||||||
|
#define GRAB_EVENTS_WANTED 1
|
||||||
|
@@ -160,16 +165,17 @@ static int ts_input_read(struct tslib_module_info *inf,
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case EV_SYN:
|
||||||
|
- /* Fill out a new complete event */
|
||||||
|
- if (pen_up) {
|
||||||
|
- samp->x = 0;
|
||||||
|
- samp->y = 0;
|
||||||
|
- samp->pressure = 0;
|
||||||
|
- pen_up = 0;
|
||||||
|
- } else {
|
||||||
|
- samp->x = i->current_x;
|
||||||
|
- samp->y = i->current_y;
|
||||||
|
- samp->pressure = i->current_p;
|
||||||
|
+ if (ev.code == SYN_REPORT) {
|
||||||
|
+ /* Fill out a new complete event */
|
||||||
|
+ if (pen_up) {
|
||||||
|
+ samp->x = 0;
|
||||||
|
+ samp->y = 0;
|
||||||
|
+ samp->pressure = 0;
|
||||||
|
+ pen_up = 0;
|
||||||
|
+ } else {
|
||||||
|
+ samp->x = i->current_x;
|
||||||
|
+ samp->y = i->current_y;
|
||||||
|
+ samp->pressure = i->current_p;
|
||||||
|
}
|
||||||
|
samp->tv = ev.time;
|
||||||
|
#ifdef DEBUG
|
||||||
|
@@ -179,6 +185,7 @@ static int ts_input_read(struct tslib_module_info *inf,
|
||||||
|
#endif /* DEBUG */
|
||||||
|
samp++;
|
||||||
|
total++;
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
case EV_ABS:
|
||||||
|
switch (ev.code) {
|
||||||
|
@@ -188,6 +195,12 @@ static int ts_input_read(struct tslib_module_info *inf,
|
||||||
|
case ABS_Y:
|
||||||
|
i->current_y = ev.value;
|
||||||
|
break;
|
||||||
|
+ case ABS_MT_POSITION_X:
|
||||||
|
+ i->current_x = ev.value;
|
||||||
|
+ break;
|
||||||
|
+ case ABS_MT_POSITION_Y:
|
||||||
|
+ i->current_y = ev.value;
|
||||||
|
+ break;
|
||||||
|
case ABS_PRESSURE:
|
||||||
|
i->current_p = ev.value;
|
||||||
|
break;
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
@ -2,9 +2,6 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
|||||||
|
|
||||||
PRINC := "${@int(PRINC) + 1}"
|
PRINC := "${@int(PRINC) + 1}"
|
||||||
|
|
||||||
SRC_URI = "git://github.com/kergoth/tslib.git \
|
SRC_URI += "file://0001-Support-reading-coordinates-from-multitouch-devices.patch \
|
||||||
file://ts.conf \
|
|
||||||
file://tslib.sh \
|
|
||||||
file://tslib.patch"
|
file://tslib.patch"
|
||||||
|
|
||||||
SRCREV = "f6c499a523bff845ddd57b1d96c9d1389f0df17b"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user