summaryrefslogtreecommitdiff
path: root/quantum/led_matrix
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-08-20 06:14:42 -0700
committerGitHub <noreply@github.com>2021-08-20 06:14:42 -0700
commit92fa07336cd7fcd578c31a8069cf955a4d601327 (patch)
treecb98f0bcbf2de674340f7063b5a5b242f6bdca3b /quantum/led_matrix
parentda11a49905605871eea66f8f03b2c4b46d1de88a (diff)
[Bug] Fix RGB/LED Matrix Suspend code (#14084)
Diffstat (limited to 'quantum/led_matrix')
-rw-r--r--quantum/led_matrix/led_matrix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c
index bcf258b260..9133849132 100644
--- a/quantum/led_matrix/led_matrix.c
+++ b/quantum/led_matrix/led_matrix.c
@@ -459,8 +459,9 @@ void led_matrix_init(void) {
void led_matrix_set_suspend_state(bool state) {
#ifdef LED_DISABLE_WHEN_USB_SUSPENDED
- if (state && is_keyboard_master()) {
- led_matrix_set_value_all(0); // turn off all LEDs when suspending
+ if (state && !suspend_state && is_keyboard_master()) { // only run if turning off, and only once
+ led_task_effect(0); // turn off all LEDs when suspending
+ led_task_flush(0); // and actually flash led state to LEDs
}
suspend_state = state;
#endif