mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Make sure the virtual T-axis buttons gets cleared for USB mice which has
less than 6 buttons. PR: 213919 MFC after: 3 days
This commit is contained in:
parent
0a4c51f423
commit
e2efc9becb
1 changed files with 4 additions and 1 deletions
|
|
@ -295,8 +295,11 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t error)
|
|||
}
|
||||
|
||||
if ((info->sc_flags & UMS_FLAG_T_AXIS) &&
|
||||
(id == info->sc_iid_t))
|
||||
(id == info->sc_iid_t)) {
|
||||
dt -= hid_get_data(buf, len, &info->sc_loc_t);
|
||||
/* T-axis is translated into button presses */
|
||||
buttons_found |= (1UL << 5) | (1UL << 6);
|
||||
}
|
||||
|
||||
for (i = 0; i < info->sc_buttons; i++) {
|
||||
uint32_t mask;
|
||||
|
|
|
|||
Loading…
Reference in a new issue