diff options
author | 2010-12-23 17:50:18 -0800 | |
---|---|---|
committer | 2010-12-29 13:19:53 -0800 | |
commit | 4c501a42173bfc0c7c9ee32312db392c59b67e13 (patch) | |
tree | d2f6ea076afa3bbb3e679eed9ccd89b70ba48944 /libs/ui/EventHub.cpp | |
parent | 54e2f4b05cfa13f4b819dcc3b98c8fa0f2fc0512 (diff) |
Add initial support for cursor-based pointing devices.
Some parts stubbed out but you can plug in a mouse and move
a green cursor around to interact with the UI.
Change-Id: I80d597a7f11d3bd92041890f74b3c77326975e6e
Diffstat (limited to 'libs/ui/EventHub.cpp')
-rw-r--r-- | libs/ui/EventHub.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp index 8f4bac6c75..4e9fad0f2c 100644 --- a/libs/ui/EventHub.cpp +++ b/libs/ui/EventHub.cpp @@ -755,14 +755,14 @@ int EventHub::openDevice(const char *devicePath) { } } - // See if this is a trackball (or mouse). + // See if this is a cursor device such as a trackball or mouse. if (test_bit(BTN_MOUSE, key_bitmask)) { uint8_t rel_bitmask[sizeof_bit_array(REL_MAX + 1)]; memset(rel_bitmask, 0, sizeof(rel_bitmask)); LOGV("Getting relative controllers..."); if (ioctl(fd, EVIOCGBIT(EV_REL, sizeof(rel_bitmask)), rel_bitmask) >= 0) { if (test_bit(REL_X, rel_bitmask) && test_bit(REL_Y, rel_bitmask)) { - device->classes |= INPUT_DEVICE_CLASS_TRACKBALL; + device->classes |= INPUT_DEVICE_CLASS_CURSOR; } } } |