diff options
| author | Maksim Yevmenkin <emax@FreeBSD.org> | 2006-03-21 18:42:52 +0000 |
|---|---|---|
| committer | Maksim Yevmenkin <emax@FreeBSD.org> | 2006-03-21 18:42:52 +0000 |
| commit | 5338f5dd69a59a1401b0fbdfeb0c90f4d3a80b54 (patch) | |
| tree | 17f21a54cb3b92284fe7b96d3392cb32843af36f /usr.sbin/bluetooth/bthidd/hid.c | |
| parent | db01a0940f9d20930c00d724b2224492dbe621c7 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/bluetooth/bthidd/hid.c')
| -rw-r--r-- | usr.sbin/bluetooth/bthidd/hid.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bluetooth/bthidd/hid.c b/usr.sbin/bluetooth/bthidd/hid.c index 0ae57bdfb761c..c350110ba0004 100644 --- a/usr.sbin/bluetooth/bthidd/hid.c +++ b/usr.sbin/bluetooth/bthidd/hid.c @@ -52,6 +52,9 @@ #undef ASIZE #define ASIZE(a) (sizeof(a)/sizeof(a[0])) +#undef HID_BUT +#define HID_BUT(i) ((i) < 3 ? (((i) ^ 3) % 3) : (i)) + /* * Process data from control channel */ @@ -216,7 +219,7 @@ hid_interrupt(bthid_session_p s, char *data, int len) break; case HUP_BUTTON: - mouse_butt |= (val << (usage - 1)); + mouse_butt |= (val << HID_BUT(usage - 1)); mevents ++; break; |
