File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -945,9 +945,10 @@ void reset_cycle() {
945
945
946
946
case MO_MVT_COAST :
947
947
mouse_data .rmpkt .wheel = 0 ; // Reset Buffered wheel movement
948
- mouse_data .mouse_movt_ticker = 0 ; // Reset mouse poll count
949
948
break ;
950
949
}
950
+
951
+ mouse_data .mouse_movt_ticker = 0 ; // Reset mouse poll count
951
952
952
953
return ;
953
954
}
@@ -1004,7 +1005,11 @@ void update_mousepacket()
1004
1005
case MO_MVT_AVERAGE :
1005
1006
1006
1007
// Avoid a Div by zero err
1007
- if ( mouse_data .mouse_movt_ticker == 0 ) { break ; }
1008
+ if ( mouse_data .mouse_movt_ticker == 0 ) {
1009
+ retpkt .x = 0 ;
1010
+ retpkt .y = 0 ;
1011
+ break ;
1012
+ }
1008
1013
1009
1014
// Divide the total mouse XY axis values by number of mouse updates
1010
1015
retpkt .x = ( int16_t ) round ( mouse_data .rmpkt .x / mouse_data .mouse_movt_ticker );
You can’t perform that action at this time.
0 commit comments