summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-08-12 21:52:49 +0200
committerEthan Yonker <dees_troy@teamw.in>2014-08-14 17:05:40 +0200
commit5742a40b87dfdc26df3bd9fe94197ae414ece546 (patch)
tree82add16a44e8836fa4ef1b276a28f42d0744bae0 /minuitwrp
parentSupport reading since_epoch and secondary brightness files (diff)
downloadandroid_bootable_recovery-5742a40b87dfdc26df3bd9fe94197ae414ece546.tar
android_bootable_recovery-5742a40b87dfdc26df3bd9fe94197ae414ece546.tar.gz
android_bootable_recovery-5742a40b87dfdc26df3bd9fe94197ae414ece546.tar.bz2
android_bootable_recovery-5742a40b87dfdc26df3bd9fe94197ae414ece546.tar.lz
android_bootable_recovery-5742a40b87dfdc26df3bd9fe94197ae414ece546.tar.xz
android_bootable_recovery-5742a40b87dfdc26df3bd9fe94197ae414ece546.tar.zst
android_bootable_recovery-5742a40b87dfdc26df3bd9fe94197ae414ece546.zip
Diffstat (limited to 'minuitwrp')
-rw-r--r--minuitwrp/Android.mk4
-rw-r--r--minuitwrp/events.c17
2 files changed, 20 insertions, 1 deletions
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index 59ee8ba56..fad451f7e 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -81,6 +81,10 @@ ifeq ($(TW_IGNORE_MAJOR_AXIS_0), true)
LOCAL_CFLAGS += -DTW_IGNORE_MAJOR_AXIS_0
endif
+ifneq ($(TW_INPUT_BLACKLIST),)
+ LOCAL_CFLAGS += -DTW_INPUT_BLACKLIST=$(TW_INPUT_BLACKLIST)
+endif
+
ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT)
else
diff --git a/minuitwrp/events.c b/minuitwrp/events.c
index 7b4655d8e..5a101028b 100644
--- a/minuitwrp/events.c
+++ b/minuitwrp/events.c
@@ -173,11 +173,26 @@ static int vk_init(struct ev *e)
e->ignored = 1;
}
#else
+#ifndef TW_INPUT_BLACKLIST
// Blacklist these "input" devices
- if (strcmp(e->deviceName, "bma250") == 0 || strcmp(e->deviceName, "bma150") == 0 || strcmp(e->deviceName, "accelerometer") == 0)
+ if (strcmp(e->deviceName, "bma250") == 0 || strcmp(e->deviceName, "bma150") == 0) == 0)
{
+ printf("blacklisting %s input device\n", e->deviceName);
e->ignored = 1;
}
+#else
+ char* bl = strdup(EXPAND(TW_INPUT_BLACKLIST));
+ char* blacklist = strtok(bl, "\n");
+
+ while (blacklist != NULL) {
+ if (strcmp(e->deviceName, blacklist) == 0) {
+ printf("blacklisting %s input device\n", blacklist);
+ e->ignored = 1;
+ }
+ blacklist = strtok(NULL, "\n");
+ }
+ free(bl);
+#endif
#endif
strcat(vk_path, e->deviceName);