From c0aca9f45cce70d590f8644374b957b0161eaabc Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 14 Jul 2024 06:38:04 +0100 Subject: Various fixes for keyboards not implementing callbacks correctly (#24116) --- keyboards/cipulot/ec_980c/ec_980c.c | 4 ++++ keyboards/cipulot/ec_typek/ec_typek.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'keyboards/cipulot') diff --git a/keyboards/cipulot/ec_980c/ec_980c.c b/keyboards/cipulot/ec_980c/ec_980c.c index 2b40d5a5e6..0e23c32335 100644 --- a/keyboards/cipulot/ec_980c/ec_980c.c +++ b/keyboards/cipulot/ec_980c/ec_980c.c @@ -86,6 +86,10 @@ void keyboard_post_init_kb(void) { * Num | Caps | Scroll | */ bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (eeprom_ec_config.num.enabled) { // The rgb_matrix_set_color function needs an RGB code to work, so first the indicator color is cast to an HSV value and then translated to RGB HSV hsv_num_indicator_color = {eeprom_ec_config.num.h, eeprom_ec_config.num.s, eeprom_ec_config.num.v}; diff --git a/keyboards/cipulot/ec_typek/ec_typek.c b/keyboards/cipulot/ec_typek/ec_typek.c index d8e0f9236e..b899ddbb8a 100644 --- a/keyboards/cipulot/ec_typek/ec_typek.c +++ b/keyboards/cipulot/ec_typek/ec_typek.c @@ -82,12 +82,14 @@ void keyboard_post_init_kb(void) { // This function gets called when caps, num, scroll change bool led_update_kb(led_t led_state) { - indicators_callback(); + if(led_update_user(led_state)) { + indicators_callback(); + } return true; } // This function is called when layers change -layer_state_t layer_state_set_user(layer_state_t state) { +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { indicators_callback(); return state; } -- cgit v1.2.3