am 1d79a9d9: Use correct size of GAMEPAD_KEYCODES

Merge commit '1d79a9d9f85f932a1fd6dcddba335450b65ba4e6' into gingerbread-plus-aosp

* commit '1d79a9d9f85f932a1fd6dcddba335450b65ba4e6':
  Use correct size of GAMEPAD_KEYCODES
This commit is contained in:
Kenny Root
2010-10-21 16:22:58 -07:00
committed by Android Git Automerger

View File

@@ -818,7 +818,7 @@ int EventHub::openDevice(const char *deviceName) {
}
// See if this device has a gamepad.
for (size_t i = 0; i < sizeof(GAMEPAD_KEYCODES); i++) {
for (size_t i = 0; i < sizeof(GAMEPAD_KEYCODES)/sizeof(GAMEPAD_KEYCODES[0]); i++) {
if (hasKeycodeLocked(device, GAMEPAD_KEYCODES[i])) {
device->classes |= INPUT_DEVICE_CLASS_GAMEPAD;
break;