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
f1b1b24c76
commit
589e4491b4
@ -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