1
0
Fork 0

Enable a default task throttle for split pointing. (#15925)

This commit is contained in:
Dasky 2022-01-26 19:24:29 +00:00 committed by GitHub
parent c99cbd915f
commit 7b31fc54df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 7 deletions

View file

@ -217,16 +217,12 @@ __attribute__((weak)) void pointing_device_task(void) {
};
#endif
#if defined(POINTING_DEVICE_TASK_THROTTLE_MS)
#if (POINTING_DEVICE_TASK_THROTTLE_MS > 0)
static uint32_t last_exec = 0;
if (timer_elapsed32(last_exec) < POINTING_DEVICE_TASK_THROTTLE_MS) {
return;
}
last_exec = timer_read32();
#else
# if defined(SPLIT_POINTING_ENABLE)
# pragma message("It's recommended you enable a throttle when sharing pointing devices.")
# endif
#endif
// Gather report info