summaryrefslogtreecommitdiff
path: root/quantum/split_common
diff options
context:
space:
mode:
authorDasky <32983009+daskygit@users.noreply.github.com>2021-12-31 23:38:23 +0000
committerGitHub <noreply@github.com>2021-12-31 15:38:23 -0800
commit4fe6f3cd7a974e28796b1c1549cca22e7002e3eb (patch)
treebc2b39e3877f0517bc8c415dd5705f118ea959fd /quantum/split_common
parentcbb51eacb062d4570f46e787b7a5e3ae0f597e53 (diff)
Fix split pointing for analog joystick (#15691)
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'quantum/split_common')
-rw-r--r--quantum/split_common/transactions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c
index 9622acb377..edaf0df628 100644
--- a/quantum/split_common/transactions.c
+++ b/quantum/split_common/transactions.c
@@ -631,9 +631,11 @@ static void pointing_handlers_slave(matrix_row_t master_matrix[], matrix_row_t s
}
last_exec = timer_read32();
# 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) {
- pointing_device_driver.set_cpi(split_shmem->pointing.cpi);
+ if (pointing_device_driver.set_cpi) {
+ pointing_device_driver.set_cpi(split_shmem->pointing.cpi);
+ }
}
memset(&temp_report, 0, sizeof(temp_report));
temp_report = pointing_device_driver.get_report(temp_report);