summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-12-29 15:13:23 +0100
committerDees Troy <dees_troy@teamw.in>2014-12-29 16:21:57 +0100
commit32f68a3c92ee8bc403b5cff6080b47ffba4f1ce7 (patch)
tree4c2964d4dee488dbc636be33ea254818a17de289 /minuitwrp
parenttoolbox_recovery should always include setenforce (diff)
downloadandroid_bootable_recovery-32f68a3c92ee8bc403b5cff6080b47ffba4f1ce7.tar
android_bootable_recovery-32f68a3c92ee8bc403b5cff6080b47ffba4f1ce7.tar.gz
android_bootable_recovery-32f68a3c92ee8bc403b5cff6080b47ffba4f1ce7.tar.bz2
android_bootable_recovery-32f68a3c92ee8bc403b5cff6080b47ffba4f1ce7.tar.lz
android_bootable_recovery-32f68a3c92ee8bc403b5cff6080b47ffba4f1ce7.tar.xz
android_bootable_recovery-32f68a3c92ee8bc403b5cff6080b47ffba4f1ce7.tar.zst
android_bootable_recovery-32f68a3c92ee8bc403b5cff6080b47ffba4f1ce7.zip
Diffstat (limited to 'minuitwrp')
-rw-r--r--minuitwrp/Android.mk4
-rw-r--r--minuitwrp/events.c12
2 files changed, 16 insertions, 0 deletions
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index cf1eb5af2..c4380aadd 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -85,6 +85,10 @@ ifeq ($(TW_IGNORE_MAJOR_AXIS_0), true)
LOCAL_CFLAGS += -DTW_IGNORE_MAJOR_AXIS_0
endif
+ifeq ($(TW_IGNORE_MT_POSITION_0), true)
+LOCAL_CFLAGS += -DTW_IGNORE_MT_POSITION_0
+endif
+
ifneq ($(TW_INPUT_BLACKLIST),)
LOCAL_CFLAGS += -DTW_INPUT_BLACKLIST=$(TW_INPUT_BLACKLIST)
endif
diff --git a/minuitwrp/events.c b/minuitwrp/events.c
index 61fcf95ea..f02edd34f 100644
--- a/minuitwrp/events.c
+++ b/minuitwrp/events.c
@@ -458,15 +458,27 @@ static int vk_modify(struct ev *e, struct input_event *ev)
e->mt_p.synced = 0x03;
if (ev->value == (1 << 31))
{
+#ifndef TW_IGNORE_MT_POSITION_0
e->mt_p.x = 0;
e->mt_p.y = 0;
lastWasSynReport = 1;
+#endif
+#ifdef _EVENT_LOGGING
+#ifndef TW_IGNORE_MT_POSITION_0
+ printf("EV: %s => EV_ABS ABS_MT_POSITION %d, set x and y to 0 and lastWasSynReport to 1\n", e->deviceName, ev->value);
+#else
+ printf("Ignoring ABS_MT_POSITION 0\n", e->deviceName, ev->value);
+#endif
+#endif
}
else
{
lastWasSynReport = 0;
e->mt_p.x = (ev->value & 0x7FFF0000) >> 16;
e->mt_p.y = (ev->value & 0xFFFF);
+#ifdef _EVENT_LOGGING
+ printf("EV: %s => EV_ABS ABS_MT_POSITION %d, set x: %d and y: %d and lastWasSynReport to 0\n", e->deviceName, ev->value, (ev->value & 0x7FFF0000) >> 16, (ev->value & 0xFFFF));
+#endif
}
break;