diff options
author | Less/Rikki <86894501+lesshonor@users.noreply.github.com> | 2023-12-13 13:33:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 18:33:15 +0000 |
commit | 49527afc6a894415efacae48fc83332daa25fc00 (patch) | |
tree | 8299da7bb70e9fd920eadb266933f9421e4eacee /keyboards/horrortroll/lemon40 | |
parent | 05d2b7e2acd798de3065cfc11e98a09f76c21ac2 (diff) |
fix: improper usage of keyboard/user-level functions (#22652)
Diffstat (limited to 'keyboards/horrortroll/lemon40')
-rw-r--r-- | keyboards/horrortroll/lemon40/lemon40.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/keyboards/horrortroll/lemon40/lemon40.c b/keyboards/horrortroll/lemon40/lemon40.c index 75321f41b3..ad42e93e67 100644 --- a/keyboards/horrortroll/lemon40/lemon40.c +++ b/keyboards/horrortroll/lemon40/lemon40.c @@ -20,18 +20,21 @@ #include "lib/bongocat.h" #ifdef OLED_ENABLE - bool oled_task_kb(void) { - led_t led_usb_state = host_keyboard_led_state(); +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + led_t led_usb_state = host_keyboard_led_state(); - render_bongocat(); - oled_set_cursor(14, 0); // sets cursor to (column, row) using charactar spacing (4 rows on 128x32 screen, anything more will overflow back to the top) - oled_write_P(PSTR("WPM:"), false); - oled_write(get_u8_str(get_current_wpm(), '0'), false); // writes wpm on top right corner of string - oled_set_cursor(17, 2); - oled_write_P(led_usb_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); - oled_set_cursor(17, 3); - oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRL") : PSTR(" "), false); + render_bongocat(); + oled_set_cursor(14, 0); // sets cursor to (column, row) using charactar spacing (4 rows on 128x32 screen, anything more will overflow back to the top) + oled_write_P(PSTR("WPM:"), false); + oled_write(get_u8_str(get_current_wpm(), '0'), false); // writes wpm on top right corner of string + oled_set_cursor(17, 2); + oled_write_P(led_usb_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); + oled_set_cursor(17, 3); + oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRL") : PSTR(" "), false); - return true; - } + return true; +} #endif |