summaryrefslogtreecommitdiff
path: root/libs/input/EventHub.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/input/EventHub.cpp')
-rw-r--r--libs/input/EventHub.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/input/EventHub.cpp b/libs/input/EventHub.cpp
index c1f41db8de43..fc324f8ce677 100644
--- a/libs/input/EventHub.cpp
+++ b/libs/input/EventHub.cpp
@@ -1305,7 +1305,8 @@ status_t EventHub::openDeviceLocked(const char *devicePath) {
device->classes |= INPUT_DEVICE_CLASS_EXTERNAL;
}
- if (device->classes & (INPUT_DEVICE_CLASS_JOYSTICK | INPUT_DEVICE_CLASS_GAMEPAD)) {
+ if (device->classes & (INPUT_DEVICE_CLASS_JOYSTICK | INPUT_DEVICE_CLASS_DPAD)
+ && device->classes & INPUT_DEVICE_CLASS_GAMEPAD) {
device->controllerNumber = getNextControllerNumberLocked(device);
setLedForController(device);
}