diff options
-rw-r--r-- | keyboards/ergodox_ez/ergodox_ez.c | 3 | ||||
-rw-r--r-- | keyboards/planck/ez/ez.c | 3 | ||||
-rw-r--r-- | quantum/rgb_matrix.c | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 3c6653a9f6..a67707895d 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -222,9 +222,6 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { #ifdef RGB_MATRIX_ENABLE void suspend_power_down_kb(void) { -#if RGB_DISABLE_WHEN_USB_SUSPENDED == true - rgb_matrix_set_color_all(0, 0, 0); -#endif rgb_matrix_set_suspend_state(true); suspend_power_down_user(); } diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c index 59b9bb61bb..79310da10a 100644 --- a/keyboards/planck/ez/ez.c +++ b/keyboards/planck/ez/ez.c @@ -22,9 +22,6 @@ keyboard_config_t keyboard_config; #ifdef RGB_MATRIX_ENABLE void suspend_power_down_kb(void) { -#if RGB_DISABLE_WHEN_USB_SUSPENDED == true - rgb_matrix_set_color_all(0, 0, 0); -#endif rgb_matrix_set_suspend_state(true); suspend_power_down_user(); } diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index f649525ccb..f4d251c99c 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -436,6 +436,9 @@ void rgb_matrix_init(void) { } void rgb_matrix_set_suspend_state(bool state) { + if (state && RGB_DISABLE_WHEN_USB_SUSPENDED) { + rgb_matrix_set_color_all(0, 0, 0); + } g_suspend_state = state; } |