Skip to content

Commit

Permalink
Check for BTN_MOUSE if INPUT_PROP_POINTER not set
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtr126 committed Nov 21, 2023
1 parent 3224a1c commit 2ea5b6d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/src/main/cpp/evdev_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,20 @@ std::vector<int> scanTouchpadDevices() {
}

if(!HasSpecificAbs(device_fd, ABS_X) || !HasSpecificAbs(device_fd, ABS_Y)) {
printf("%s: ABS_X or ABS_Y events not found\n", dev_name);
printf("%s: no ABS_X or ABS_Y events found\n", dev_name);
printf("Not a touch device\n");
close(device_fd);
continue;
}

if (!HasInputProp(device_fd, INPUT_PROP_POINTER)) {
printf("%s: INPUT_PROP_POINTER not set\n", dev_name);
printf("Not a touchpad device\n");
close(device_fd);
continue;
if (!HasSpecificKey(device_fd, BTN_MOUSE)) {
printf("BTN_MOUSE not found\n");
printf("Not a touchpad device\n");
close(device_fd);
continue;
}
}


Expand Down

0 comments on commit 2ea5b6d

Please sign in to comment.