aboutsummaryrefslogtreecommitdiff
path: root/quantum/rgb_matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/rgb_matrix.c')
-rw-r--r--quantum/rgb_matrix.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 55a6f74be..9bbeff833 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -417,7 +417,12 @@ void rgb_matrix_init(void) {
417 eeconfig_debug_rgb_matrix(); // display current eeprom values 417 eeconfig_debug_rgb_matrix(); // display current eeprom values
418} 418}
419 419
420void rgb_matrix_set_suspend_state(bool state) { g_suspend_state = state; } 420void rgb_matrix_set_suspend_state(bool state) {
421 if (RGB_DISABLE_WHEN_USB_SUSPENDED && state) {
422 rgb_matrix_set_color_all(0, 0, 0); // turn off all LEDs when suspending
423 }
424 g_suspend_state = state;
425}
421 426
422void rgb_matrix_toggle(void) { 427void rgb_matrix_toggle(void) {
423 rgb_matrix_config.enable ^= 1; 428 rgb_matrix_config.enable ^= 1;