diff options
| -rw-r--r-- | quantum/split_common/transactions.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c index 33bc9e9f57..2bebd2757d 100644 --- a/quantum/split_common/transactions.c +++ b/quantum/split_common/transactions.c | |||
| @@ -710,16 +710,17 @@ static bool pointing_handlers_master(matrix_row_t master_matrix[], matrix_row_t | |||
| 710 | return true; | 710 | return true; |
| 711 | } | 711 | } |
| 712 | # endif | 712 | # endif |
| 713 | static uint32_t last_update = 0; | 713 | static uint32_t last_update = 0; |
| 714 | static uint16_t last_cpi = 0; | 714 | static uint32_t last_cpi_update = 0; |
| 715 | static uint16_t last_cpi = 0; | ||
| 715 | report_mouse_t temp_state; | 716 | report_mouse_t temp_state; |
| 716 | uint16_t temp_cpi; | 717 | uint16_t temp_cpi; |
| 717 | bool okay = read_if_checksum_mismatch(GET_POINTING_CHECKSUM, GET_POINTING_DATA, &last_update, &temp_state, &split_shmem->pointing.report, sizeof(temp_state)); | 718 | bool okay = read_if_checksum_mismatch(GET_POINTING_CHECKSUM, GET_POINTING_DATA, &last_update, &temp_state, &split_shmem->pointing.report, sizeof(temp_state)); |
| 718 | if (okay) pointing_device_set_shared_report(temp_state); | 719 | if (okay) pointing_device_set_shared_report(temp_state); |
| 719 | temp_cpi = pointing_device_get_shared_cpi(); | 720 | temp_cpi = pointing_device_get_shared_cpi(); |
| 720 | if (temp_cpi && last_cpi != temp_cpi) { | 721 | if (temp_cpi) { |
| 721 | split_shmem->pointing.cpi = temp_cpi; | 722 | split_shmem->pointing.cpi = temp_cpi; |
| 722 | okay = transport_write(PUT_POINTING_CPI, &split_shmem->pointing.cpi, sizeof(split_shmem->pointing.cpi)); | 723 | okay = send_if_condition(PUT_POINTING_CPI, &last_cpi_update, last_cpi != temp_cpi, &split_shmem->pointing.cpi, sizeof(split_shmem->pointing.cpi)); |
| 723 | if (okay) { | 724 | if (okay) { |
| 724 | last_cpi = temp_cpi; | 725 | last_cpi = temp_cpi; |
| 725 | } | 726 | } |
