diff options
author | Joel Challis <[email protected]> | 2024-07-14 06:38:04 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-07-14 06:38:04 +0100 |
commit | c0aca9f45cce70d590f8644374b957b0161eaabc (patch) | |
tree | f66e31771c4f1ca8b0dc3183eb379d319ce63f0b /keyboards/cipulot | |
parent | e76069ea4eb73d97c85cf0272fe14285fad32fb8 (diff) | |
download | qmk_firmware-c0aca9f45cce70d590f8644374b957b0161eaabc.tar.gz qmk_firmware-c0aca9f45cce70d590f8644374b957b0161eaabc.zip |
Various fixes for keyboards not implementing callbacks correctly (#24116)
Diffstat (limited to 'keyboards/cipulot')
-rw-r--r-- | keyboards/cipulot/ec_980c/ec_980c.c | 4 | ||||
-rw-r--r-- | keyboards/cipulot/ec_typek/ec_typek.c | 6 |
2 files changed, 8 insertions, 2 deletions
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; } |