fix RGB_DISABLE_TIMEOUT flicker on split keyboards (#14954)

master
Erik Berthold 2021-12-27 03:50:44 +01:00 committed by GitHub
parent 4eb6d19530
commit 2c8d46f408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -275,12 +275,8 @@ static void rgb_task_timers(void) {
// Update double buffer timers // Update double buffer timers
#if RGB_DISABLE_TIMEOUT > 0 #if RGB_DISABLE_TIMEOUT > 0
if (rgb_anykey_timer < UINT32_MAX) { if (rgb_anykey_timer + deltaTime <= UINT32_MAX) {
if (UINT32_MAX - deltaTime < rgb_anykey_timer) { rgb_anykey_timer += deltaTime;
rgb_anykey_timer = UINT32_MAX;
} else {
rgb_anykey_timer += deltaTime;
}
} }
#endif // RGB_DISABLE_TIMEOUT > 0 #endif // RGB_DISABLE_TIMEOUT > 0