summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2014-03-13 00:37:10 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-03-13 00:37:10 +0000
commitd23d916e0fc573ccde8a622aaa42ccfae9d31f82 (patch)
treebfb96fd3017fa2511bc13c4b741e3200215bf709 /libs
parentca9eef6203b7cfb0084f8305d4dcc5d70a7a25cd (diff)
parentb0aa4822f59ac39e736f67e76b0a7742ca4c3da9 (diff)
downloadframeworks_base-d23d916e0fc573ccde8a622aaa42ccfae9d31f82.zip
frameworks_base-d23d916e0fc573ccde8a622aaa42ccfae9d31f82.tar.gz
frameworks_base-d23d916e0fc573ccde8a622aaa42ccfae9d31f82.tar.bz2
Merge "Controllers must have buttons and a movement mechanism." into klp-modular-dev
Diffstat (limited to 'libs')
-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 c1f41db..fc324f8 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);
}