summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-08-10 19:30:10 +0200
committerDees Troy <dees_troy@teamw.in>2016-08-11 02:34:15 +0200
commit64dbd0df84d5ed643920ce444feb67a6c0c983d2 (patch)
tree95c05c2a246adc4ccf042ba0d17c5da1bdc0bd06
parentrecovery: allow usage of TARGET_CRYPTFS_HW_PATH (diff)
downloadandroid_bootable_recovery-64dbd0df84d5ed643920ce444feb67a6c0c983d2.tar
android_bootable_recovery-64dbd0df84d5ed643920ce444feb67a6c0c983d2.tar.gz
android_bootable_recovery-64dbd0df84d5ed643920ce444feb67a6c0c983d2.tar.bz2
android_bootable_recovery-64dbd0df84d5ed643920ce444feb67a6c0c983d2.tar.lz
android_bootable_recovery-64dbd0df84d5ed643920ce444feb67a6c0c983d2.tar.xz
android_bootable_recovery-64dbd0df84d5ed643920ce444feb67a6c0c983d2.tar.zst
android_bootable_recovery-64dbd0df84d5ed643920ce444feb67a6c0c983d2.zip
-rw-r--r--minuitwrp/events.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/minuitwrp/events.cpp b/minuitwrp/events.cpp
index d4ca0abbc..54119ebc0 100644
--- a/minuitwrp/events.cpp
+++ b/minuitwrp/events.cpp
@@ -176,7 +176,7 @@ static int vk_init(struct ev *e)
}
#else
#ifndef TW_INPUT_BLACKLIST
- // Blacklist these "input" devices
+ // Blacklist these "input" devices, use TW_INPUT_BLACKLIST := "accelerometer\x0atest1\x0atest2" using the \x0a as a separator between input devices
if (strcmp(e->deviceName, "bma250") == 0 || strcmp(e->deviceName, "bma150") == 0)
{
printf("blacklisting %s input device\n", e->deviceName);
@@ -277,7 +277,7 @@ static int vk_init(struct ev *e)
// Check for EV_REL (REL_X and REL_Y) and, because touchscreens can have those too,
// check also for EV_KEY (BTN_LEFT and BTN_RIGHT)
-static void check_mouse(int fd)
+static void check_mouse(int fd, const char* deviceName)
{
if(has_mouse)
return;
@@ -297,6 +297,7 @@ static void check_mouse(int fd)
if(!test_bit(BTN_LEFT, bit[EV_KEY]) || !test_bit(BTN_RIGHT, bit[EV_KEY]))
return;
+ printf("Found mouse '%s'\n", deviceName);
has_mouse = 1;
}
@@ -326,9 +327,10 @@ int ev_init(void)
evs[ev_count].fd = &ev_fds[ev_count];
/* Load virtualkeys if there are any */
- vk_init(&evs[ev_count]);
+ vk_init(&evs[ev_count]);
- check_mouse(fd);
+ if (!evs[ev_count].ignored)
+ check_mouse(fd, evs[ev_count].deviceName);
ev_count++;
if(ev_count == MAX_DEVICES) break;