summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Michael Wright <michaelwr@google.com> 2014-03-13 00:42:43 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2014-03-13 00:42:43 +0000
commit444b0c6b72bf508e3a672fe34d0f4b00cfea19f9 (patch)
treed3991073f15b8526db2208527864ba0284b287a6
parentbcb2839d576f1e91f0085d09c2b279d03053910f (diff)
parentf80f60ba2b61df9f9544fcae8d8bdbe5542269fc (diff)
am f80f60ba: am d23d916e: Merge "Controllers must have buttons and a movement mechanism." into klp-modular-dev
* commit 'f80f60ba2b61df9f9544fcae8d8bdbe5542269fc': Controllers must have buttons and a movement mechanism.
-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);
}