diff options
author | Drashna Jaelre <drashna@live.com> | 2021-08-20 06:14:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-20 06:14:42 -0700 |
commit | 92fa07336cd7fcd578c31a8069cf955a4d601327 (patch) | |
tree | cb98f0bcbf2de674340f7063b5a5b242f6bdca3b /quantum/rgb_matrix/rgb_matrix.c | |
parent | da11a49905605871eea66f8f03b2c4b46d1de88a (diff) |
[Bug] Fix RGB/LED Matrix Suspend code (#14084)
Diffstat (limited to 'quantum/rgb_matrix/rgb_matrix.c')
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index e5635ee039..8f00b40877 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -501,8 +501,9 @@ void rgb_matrix_init(void) { void rgb_matrix_set_suspend_state(bool state) { #ifdef RGB_DISABLE_WHEN_USB_SUSPENDED - if (state) { - rgb_matrix_set_color_all(0, 0, 0); // turn off all LEDs when suspending + if (state && !suspend_state) { // only run if turning off, and only once + rgb_task_render(0); // turn off all LEDs when suspending + rgb_task_flush(0); // and actually flash led state to LEDs } suspend_state = state; #endif |