diff options
author | Erik Berthold <eberthold@users.noreply.github.com> | 2021-12-27 03:50:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-27 13:50:44 +1100 |
commit | 2c8d46f40843507a4aff66368194faf25745fed9 (patch) | |
tree | 07ed5bb2161c130a9bad6d435625abce83e2a49a /quantum | |
parent | 4eb6d1953063f5f73a917584a17bb1e7187de043 (diff) | |
download | qmk_firmware-2c8d46f40843507a4aff66368194faf25745fed9.tar.gz qmk_firmware-2c8d46f40843507a4aff66368194faf25745fed9.zip |
fix RGB_DISABLE_TIMEOUT flicker on split keyboards (#14954)
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 558c7bd41..51e9554e2 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c | |||
@@ -275,12 +275,8 @@ static void rgb_task_timers(void) { | |||
275 | 275 | ||
276 | // Update double buffer timers | 276 | // Update double buffer timers |
277 | #if RGB_DISABLE_TIMEOUT > 0 | 277 | #if RGB_DISABLE_TIMEOUT > 0 |
278 | if (rgb_anykey_timer < UINT32_MAX) { | 278 | if (rgb_anykey_timer + deltaTime <= UINT32_MAX) { |
279 | if (UINT32_MAX - deltaTime < rgb_anykey_timer) { | 279 | rgb_anykey_timer += deltaTime; |
280 | rgb_anykey_timer = UINT32_MAX; | ||
281 | } else { | ||
282 | rgb_anykey_timer += deltaTime; | ||
283 | } | ||
284 | } | 280 | } |
285 | #endif // RGB_DISABLE_TIMEOUT > 0 | 281 | #endif // RGB_DISABLE_TIMEOUT > 0 |
286 | 282 | ||