File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -56,14 +56,15 @@ void send_movement_packet(void)
56
56
int max = 3 ;
57
57
int timeout = 0 ;
58
58
59
-
60
59
if (five_button_mode )
61
60
max = 4 ;
62
61
/* sometimes the host will get behind */
63
- while (aux_buffer_available () < max && timeout ++ < 25 )
62
+ while (aux_buffer_available () < max && timeout ++ < 25 &&
63
+ (* task_get_event_bitmap (emumouse_task_id ) & PS2MOUSE_EVT_AUX_DATA ) == 0 ) {
64
64
usleep (10 * MSEC );
65
+ }
65
66
66
- if (timeout == 25 ) {
67
+ if (timeout == 25 || ( * task_get_event_bitmap ( emumouse_task_id ) & PS2MOUSE_EVT_AUX_DATA ) ) {
67
68
CPRINTS ("PS2M Dropping" );
68
69
/*drop mouse packet - host is too far behind */
69
70
return ;
@@ -431,9 +432,7 @@ void mouse_interrupt_handler_task(void *p)
431
432
if (ec_mode_disabled == false) {
432
433
if (evt & PS2MOUSE_EVT_AUX_DATA ) {
433
434
process_request (aux_data );
434
- }
435
-
436
- if (evt & PS2MOUSE_EVT_INTERRUPT ) {
435
+ } else if (evt & PS2MOUSE_EVT_INTERRUPT ) {
437
436
usleep (4 * MSEC );
438
437
/* at the expensive of a slight additional latency
439
438
* check to see if the soc has grabbed this out from under us
You can’t perform that action at this time.
0 commit comments