Fix split pointing for analog joystick (#15691)
Co-authored-by: Nick Brassel <nick@tzarc.org>
This commit is contained in:
parent
cbb51eacb0
commit
4fe6f3cd7a
1 changed files with 4 additions and 2 deletions
|
@ -631,10 +631,12 @@ static void pointing_handlers_slave(matrix_row_t master_matrix[], matrix_row_t s
|
||||||
}
|
}
|
||||||
last_exec = timer_read32();
|
last_exec = timer_read32();
|
||||||
# endif
|
# endif
|
||||||
temp_cpi = pointing_device_driver.get_cpi();
|
temp_cpi = !pointing_device_driver.get_cpi ? 0 : pointing_device_driver.get_cpi(); // check for NULL
|
||||||
if (split_shmem->pointing.cpi && memcmp(&split_shmem->pointing.cpi, &temp_cpi, sizeof(temp_cpi)) != 0) {
|
if (split_shmem->pointing.cpi && memcmp(&split_shmem->pointing.cpi, &temp_cpi, sizeof(temp_cpi)) != 0) {
|
||||||
|
if (pointing_device_driver.set_cpi) {
|
||||||
pointing_device_driver.set_cpi(split_shmem->pointing.cpi);
|
pointing_device_driver.set_cpi(split_shmem->pointing.cpi);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
memset(&temp_report, 0, sizeof(temp_report));
|
memset(&temp_report, 0, sizeof(temp_report));
|
||||||
temp_report = pointing_device_driver.get_report(temp_report);
|
temp_report = pointing_device_driver.get_report(temp_report);
|
||||||
memcpy(&split_shmem->pointing.report, &temp_report, sizeof(temp_report));
|
memcpy(&split_shmem->pointing.report, &temp_report, sizeof(temp_report));
|
||||||
|
|
Loading…
Reference in a new issue