summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-12-27 02:51:13 +0000
committerQMK Bot <hello@qmk.fm>2021-12-27 02:51:13 +0000
commitc20096c7aaa62618473b18bc2d7c08b68a48d14c (patch)
tree3df71902782ee749310d2c3721f9eb705c745052
parent79f2445414d293e531736b15155007472d46b77b (diff)
parent2c8d46f40843507a4aff66368194faf25745fed9 (diff)
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--quantum/rgb_matrix/rgb_matrix.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c
index 558c7bd41a..51e9554e2d 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