From 5a06813b105277998b80771f094059047916f4e4 Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Tue, 1 Jun 2021 14:56:23 +1000 Subject: VIA compile fixes (#13054) --- keyboards/rubi/rubi.c | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) (limited to 'keyboards/rubi/rubi.c') diff --git a/keyboards/rubi/rubi.c b/keyboards/rubi/rubi.c index 6cdf8302c1..50e5fcf782 100644 --- a/keyboards/rubi/rubi.c +++ b/keyboards/rubi/rubi.c @@ -73,36 +73,7 @@ bool led_update_kb(led_t led_state) { return true; } -__attribute__ ((weak)) void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - if (get_highest_layer(layer_state) == 0) { - uint16_t mapped_code = 0; - if (clockwise) { - mapped_code = handle_encoder_cw(); - } else { - mapped_code = handle_encoder_ccw(); - } - if (mapped_code != 0) { - tap_code16(mapped_code); - } - } else { - if (clockwise) { - if (oled_mode == OLED_MODE_CALC) { - handle_encoder_cw(); - } else if (oled_mode == OLED_MODE_DEFAULT) { - change_encoder_mode(false); - } - } else { - if (oled_mode == OLED_MODE_CALC) { - handle_encoder_ccw(); - } else if (oled_mode == OLED_MODE_DEFAULT) { - change_encoder_mode(true); - } - } - } - } -} - -void encoder_update_kb(uint8_t index, bool clockwise) { - encoder_update_user(index, clockwise); +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + return true; } -- cgit v1.2.3