Make sure the virtual T-axis buttons generate button release event(s)
for continuous tilting. PR: 213957 MFC after: 3 days
This commit is contained in:
parent
23bf9e1527
commit
d03403c4b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308165
@ -330,10 +330,13 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t error)
|
||||
dx, dy, dz, dt, dw, buttons);
|
||||
|
||||
/* translate T-axis into button presses until further */
|
||||
if (dt > 0)
|
||||
if (dt > 0) {
|
||||
ums_put_queue(sc, 0, 0, 0, 0, buttons);
|
||||
buttons |= 1UL << 5;
|
||||
else if (dt < 0)
|
||||
} else if (dt < 0) {
|
||||
ums_put_queue(sc, 0, 0, 0, 0, buttons);
|
||||
buttons |= 1UL << 6;
|
||||
}
|
||||
|
||||
sc->sc_status.button = buttons;
|
||||
sc->sc_status.dx += dx;
|
||||
|
Loading…
Reference in New Issue
Block a user