summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2010-10-21 17:21:56 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-10-21 17:21:56 -0700
commit470ce098f82047304f78162646d65ed3a908e95e (patch)
tree7c11c85aa19e50b746ae790bc99b946d8290d770 /libs
parent39df5331c7423455f1fb6c01b075b618f8bc00fd (diff)
parentd7cd560af506f75d07034c136bea09b409b4d408 (diff)
downloadframeworks_base-470ce098f82047304f78162646d65ed3a908e95e.zip
frameworks_base-470ce098f82047304f78162646d65ed3a908e95e.tar.gz
frameworks_base-470ce098f82047304f78162646d65ed3a908e95e.tar.bz2
am d7cd560a: am 1d79a9d9: Use correct size of GAMEPAD_KEYCODES
Merge commit 'd7cd560af506f75d07034c136bea09b409b4d408' * commit 'd7cd560af506f75d07034c136bea09b409b4d408': Use correct size of GAMEPAD_KEYCODES
Diffstat (limited to 'libs')
-rw-r--r--libs/ui/EventHub.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp
index 97a7528..bc08e0a 100644
--- a/libs/ui/EventHub.cpp
+++ b/libs/ui/EventHub.cpp
@@ -839,7 +839,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;