Merge "Controllers must have buttons and a movement mechanism."

This commit is contained in:
Michael Wright 2014-03-12 21:56:24 +00:00 committed by Android (Google) Code Review
commit 0c28f11e22
1 changed files with 2 additions and 1 deletions

View File

@ -1291,7 +1291,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);
}