Skip to content

Commit

Permalink
Do not show Pixel fingerprint sensor as a game controller, closes #9
Browse files Browse the repository at this point in the history
  • Loading branch information
MrStahlfelge committed Jul 11, 2021
1 parent caecd9c commit da27efa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ private void gatherControllers(boolean sendEvent) {
removedControllers.putAll(controllerMap);

for(int deviceId: InputDevice.getDeviceIds()) {
InputDevice device = InputDevice.getDevice(deviceId);
AndroidController controller = controllerMap.get(deviceId);
if(controller != null) {
removedControllers.remove(deviceId);
Expand Down Expand Up @@ -311,7 +310,8 @@ protected void removeController(int deviceId) {
private boolean isController(InputDevice device) {
return ((device.getSources() & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK)
&& (((device.getSources() & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD)
|| (device.getKeyboardType() != InputDevice.KEYBOARD_TYPE_ALPHABETIC));
|| (device.getKeyboardType() != InputDevice.KEYBOARD_TYPE_ALPHABETIC))
&& !"uinput-fpc".equals(device.getName());
}

@Override
Expand Down

0 comments on commit da27efa

Please sign in to comment.