From 2032f98f8c6176be7819bd3bc4459a05542c5b85 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Thu, 4 Mar 2010 16:00:29 -0800 Subject: Fix #2489986 : The key bitmask needs to cover all possible keys Change-Id: Ieebd2f879e6b6fbc0388655dd66f34be89e809a0 --- libs/ui/EventHub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp index 57192a5..34cd9d1 100644 --- a/libs/ui/EventHub.cpp +++ b/libs/ui/EventHub.cpp @@ -608,7 +608,7 @@ int EventHub::open_device(const char *deviceName) // consider up through the function keys; we don't want to include // ones after that (play cd etc) so we don't mistakenly consider a // controller to be a keyboard. - uint8_t key_bitmask[(KEY_PLAYCD+1)/8]; + uint8_t key_bitmask[(KEY_MAX+1)/8]; memset(key_bitmask, 0, sizeof(key_bitmask)); LOGV("Getting keys..."); if (ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask) >= 0) { -- cgit v1.1