summaryrefslogtreecommitdiff
path: root/keyboards/mechwild
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-02-06 13:36:09 +1100
committerGitHub <noreply@github.com>2023-02-06 02:36:09 +0000
commitf0618a1d53a50a6ed6a6b050daf31365599bef4b (patch)
tree45ffe5bc929f0815b81816fd648f1a90cfbe5356 /keyboards/mechwild
parentd5e622b979c54ddc8f9ad97116c302e29c6aed12 (diff)
Remove `IS_HOST_LED_ON` and migrate usages (#19753)
Diffstat (limited to 'keyboards/mechwild')
-rwxr-xr-xkeyboards/mechwild/mercutio/keymaps/fancy/keymap.c4
-rwxr-xr-xkeyboards/mechwild/mercutio/keymaps/jonavin/keymap.c4
-rw-r--r--keyboards/mechwild/puckbuddy/puckbuddy.c3
3 files changed, 6 insertions, 5 deletions
diff --git a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c
index ca1ac03d2b..506f298030 100755
--- a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c
+++ b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c
@@ -108,8 +108,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}
bool oled_task_user(void) {
-
- if ( IS_HOST_LED_OFF(USB_LED_NUM_LOCK) && IS_HOST_LED_OFF(USB_LED_CAPS_LOCK) && selected_layer == 0 && get_highest_layer(layer_state) == 0 ) {
+ led_t led_state = host_keyboard_led_state();
+ if ( !led_state.num_lock && !led_state.caps_lock && selected_layer == 0 && get_highest_layer(layer_state) == 0 ) {
render_name();
clear_screen = true;
} else {
diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
index 7e1e055d1d..b352a0d6ad 100755
--- a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
+++ b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
@@ -188,8 +188,8 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
}
bool oled_task_user(void) {
-
- if ( IS_HOST_LED_OFF(USB_LED_NUM_LOCK) && IS_HOST_LED_OFF(USB_LED_CAPS_LOCK) && get_selected_layer() == 0 && get_highest_layer(layer_state) == 0 ) {
+ led_t led_state = host_keyboard_led_state();
+ if ( !led_state.num_lock && !led_state.caps_lock && get_selected_layer() == 0 && get_highest_layer(layer_state) == 0 ) {
render_name();
clear_screen = true;
} else {
diff --git a/keyboards/mechwild/puckbuddy/puckbuddy.c b/keyboards/mechwild/puckbuddy/puckbuddy.c
index e6dc469111..5cf2d79b36 100644
--- a/keyboards/mechwild/puckbuddy/puckbuddy.c
+++ b/keyboards/mechwild/puckbuddy/puckbuddy.c
@@ -126,7 +126,8 @@ bool oled_task_kb(void) {
if(!oled_task_user()) {
return false;
}
- if ( IS_HOST_LED_OFF(USB_LED_NUM_LOCK) && IS_HOST_LED_OFF(USB_LED_CAPS_LOCK) && IS_HOST_LED_OFF(USB_LED_SCROLL_LOCK) && get_highest_layer(layer_state) == 0 ) {
+ led_t led_state = host_keyboard_led_state();
+ if ( !led_state.num_lock && !led_state.caps_lock && !led_state.scroll_lock && get_highest_layer(layer_state) == 0 ) {
if (clear_screen_art == true) {
oled_clear();
oled_render();