From 2c8d46f40843507a4aff66368194faf25745fed9 Mon Sep 17 00:00:00 2001 From: Erik Berthold Date: Mon, 27 Dec 2021 03:50:44 +0100 Subject: [PATCH] fix RGB_DISABLE_TIMEOUT flicker on split keyboards (#14954) --- quantum/rgb_matrix/rgb_matrix.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 558c7bd41a3..51e9554e2dc 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) { // Update double buffer timers #if RGB_DISABLE_TIMEOUT > 0 - if (rgb_anykey_timer < UINT32_MAX) { - if (UINT32_MAX - deltaTime < rgb_anykey_timer) { - rgb_anykey_timer = UINT32_MAX; - } else { - rgb_anykey_timer += deltaTime; - } + if (rgb_anykey_timer + deltaTime <= UINT32_MAX) { + rgb_anykey_timer += deltaTime; } #endif // RGB_DISABLE_TIMEOUT > 0