diff options
Diffstat (limited to 'keyboards/duck/lightsaver')
-rw-r--r-- | keyboards/duck/lightsaver/lightsaver.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/keyboards/duck/lightsaver/lightsaver.c b/keyboards/duck/lightsaver/lightsaver.c index e0fe918e7d..eba1ce25c2 100644 --- a/keyboards/duck/lightsaver/lightsaver.c +++ b/keyboards/duck/lightsaver/lightsaver.c @@ -39,18 +39,20 @@ void backlight_set(uint8_t level) { } } -void led_set_kb(uint8_t usb_led) { - bool leds[8] = { - usb_led & (1<<USB_LED_CAPS_LOCK), - usb_led & (1<<USB_LED_SCROLL_LOCK), - usb_led & (1<<USB_LED_NUM_LOCK), - layer_state & (1<<1), - layer_state & (1<<2), - layer_state & (1<<3), - layer_state & (1<<4), - layer_state & (1<<5) - }; - indicator_leds_set(leds); - - led_set_user(usb_led); -} +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + bool leds[8] = { + led_state.caps_lock, + led_state.scroll_lock, + led_state.num_lock, + layer_state & (1<<1), + layer_state & (1<<2), + layer_state & (1<<3), + layer_state & (1<<4), + layer_state & (1<<5) + }; + indicator_leds_set(leds); + } + return res; +}
\ No newline at end of file |