Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
83477bfa0f
|
@ -80,7 +80,7 @@ void ps2_mouse_task(void) {
|
||||||
uint8_t rcv;
|
uint8_t rcv;
|
||||||
rcv = ps2_host_send(PS2_MOUSE_READ_DATA);
|
rcv = ps2_host_send(PS2_MOUSE_READ_DATA);
|
||||||
if (rcv == PS2_ACK) {
|
if (rcv == PS2_ACK) {
|
||||||
mouse_report.buttons = ps2_host_recv_response() | tp_buttons;
|
mouse_report.buttons = ps2_host_recv_response();
|
||||||
mouse_report.x = ps2_host_recv_response() * PS2_MOUSE_X_MULTIPLIER;
|
mouse_report.x = ps2_host_recv_response() * PS2_MOUSE_X_MULTIPLIER;
|
||||||
mouse_report.y = ps2_host_recv_response() * PS2_MOUSE_Y_MULTIPLIER;
|
mouse_report.y = ps2_host_recv_response() * PS2_MOUSE_Y_MULTIPLIER;
|
||||||
# ifdef PS2_MOUSE_ENABLE_SCROLLING
|
# ifdef PS2_MOUSE_ENABLE_SCROLLING
|
||||||
|
@ -88,11 +88,10 @@ void ps2_mouse_task(void) {
|
||||||
# endif
|
# endif
|
||||||
} else {
|
} else {
|
||||||
if (debug_mouse) print("ps2_mouse: fail to get mouse packet\n");
|
if (debug_mouse) print("ps2_mouse: fail to get mouse packet\n");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (pbuf_has_data()) {
|
if (pbuf_has_data()) {
|
||||||
mouse_report.buttons = ps2_host_recv_response() | tp_buttons;
|
mouse_report.buttons = ps2_host_recv_response();
|
||||||
mouse_report.x = ps2_host_recv_response() * PS2_MOUSE_X_MULTIPLIER;
|
mouse_report.x = ps2_host_recv_response() * PS2_MOUSE_X_MULTIPLIER;
|
||||||
mouse_report.y = ps2_host_recv_response() * PS2_MOUSE_Y_MULTIPLIER;
|
mouse_report.y = ps2_host_recv_response() * PS2_MOUSE_Y_MULTIPLIER;
|
||||||
# ifdef PS2_MOUSE_ENABLE_SCROLLING
|
# ifdef PS2_MOUSE_ENABLE_SCROLLING
|
||||||
|
@ -100,10 +99,10 @@ void ps2_mouse_task(void) {
|
||||||
# endif
|
# endif
|
||||||
} else {
|
} else {
|
||||||
if (debug_mouse) print("ps2_mouse: fail to get mouse packet\n");
|
if (debug_mouse) print("ps2_mouse: fail to get mouse packet\n");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
mouse_report.buttons |= tp_buttons;
|
||||||
/* if mouse moves or buttons state changes */
|
/* if mouse moves or buttons state changes */
|
||||||
if (mouse_report.x || mouse_report.y || mouse_report.v || ((mouse_report.buttons ^ buttons_prev) & PS2_MOUSE_BTN_MASK)) {
|
if (mouse_report.x || mouse_report.y || mouse_report.v || ((mouse_report.buttons ^ buttons_prev) & PS2_MOUSE_BTN_MASK)) {
|
||||||
#ifdef PS2_MOUSE_DEBUG_RAW
|
#ifdef PS2_MOUSE_DEBUG_RAW
|
||||||
|
|
Loading…
Reference in New Issue