meta-sunxi/recipes-graphics/tslib/tslib/tslib.patch
2013-02-25 20:42:59 +01:00

35 lines
1.2 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--- tslib/plugins/input-raw.c 2012-12-15 16:07:26.511158233 +0200
+++ tslib/plugins/input-raw.c 2012-12-18 10:05:15.759559286 +0200
@@ -43,6 +43,7 @@
#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 */
+# define ABS_MT_TOUCH_MAJOR      0x30    /* Press */
#endif
#include "tslib-private.h"
@@ -98,8 +99,8 @@
if ((ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit)) < 0 ||
!(absbit[BIT_WORD(ABS_X)] & BIT_MASK(ABS_X)) ||
!(absbit[BIT_WORD(ABS_Y)] & BIT_MASK(ABS_Y))) {
- fprintf(stderr, "tslib: Selected device is not a touchscreen (must support ABS_X and ABS_Y events)\n");
- return -1;
+ /* fprintf(stderr, "tslib: Selected device is not a touchscreen (must support ABS_X and ABS_Y events)\n");
+ return -1;*/
}
/* Since some touchscreens (eg. infrared) physically can't measure pressure,
@@ -201,6 +202,11 @@
case ABS_MT_POSITION_Y:
i->current_y = ev.value;
break;
+ case ABS_MT_TOUCH_MAJOR:
+ i->current_p = ev.value;
+ break;
+
+
case ABS_PRESSURE:
i->current_p = ev.value;
break;