summaryrefslogtreecommitdiffstats
path: root/minuitwrp/events.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--minuitwrp/events.c17
1 files changed, 16 insertions, 1 deletions
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);