Merge remote-tracking branch 'origin/master' into develop
commit
a871dab668
|
@ -716,15 +716,16 @@ static bool pointing_handlers_master(matrix_row_t master_matrix[], matrix_row_t
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
static uint32_t last_update = 0;
|
static uint32_t last_update = 0;
|
||||||
|
static uint32_t last_cpi_update = 0;
|
||||||
static uint16_t last_cpi = 0;
|
static uint16_t last_cpi = 0;
|
||||||
report_mouse_t temp_state;
|
report_mouse_t temp_state;
|
||||||
uint16_t temp_cpi;
|
uint16_t temp_cpi;
|
||||||
bool okay = read_if_checksum_mismatch(GET_POINTING_CHECKSUM, GET_POINTING_DATA, &last_update, &temp_state, &split_shmem->pointing.report, sizeof(temp_state));
|
bool okay = read_if_checksum_mismatch(GET_POINTING_CHECKSUM, GET_POINTING_DATA, &last_update, &temp_state, &split_shmem->pointing.report, sizeof(temp_state));
|
||||||
if (okay) pointing_device_set_shared_report(temp_state);
|
if (okay) pointing_device_set_shared_report(temp_state);
|
||||||
temp_cpi = pointing_device_get_shared_cpi();
|
temp_cpi = pointing_device_get_shared_cpi();
|
||||||
if (temp_cpi && last_cpi != temp_cpi) {
|
if (temp_cpi) {
|
||||||
split_shmem->pointing.cpi = temp_cpi;
|
split_shmem->pointing.cpi = temp_cpi;
|
||||||
okay = transport_write(PUT_POINTING_CPI, &split_shmem->pointing.cpi, sizeof(split_shmem->pointing.cpi));
|
okay = send_if_condition(PUT_POINTING_CPI, &last_cpi_update, last_cpi != temp_cpi, &split_shmem->pointing.cpi, sizeof(split_shmem->pointing.cpi));
|
||||||
if (okay) {
|
if (okay) {
|
||||||
last_cpi = temp_cpi;
|
last_cpi = temp_cpi;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue