diff options
Diffstat (limited to 'keyboards/splitkb/zima/zima.c')
-rw-r--r-- | keyboards/splitkb/zima/zima.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/keyboards/splitkb/zima/zima.c b/keyboards/splitkb/zima/zima.c index 3989ebeb2..74f9c84a7 100644 --- a/keyboards/splitkb/zima/zima.c +++ b/keyboards/splitkb/zima/zima.c | |||
@@ -93,12 +93,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { | |||
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | #ifdef ENCODER_ENABLE | 95 | #ifdef ENCODER_ENABLE |
96 | __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) { | 96 | bool encoder_update_kb(uint8_t index, bool clockwise) { |
97 | if (clockwise) { | ||
98 | tap_code16(KC_VOLU); | ||
99 | } else { | ||
100 | tap_code16(KC_VOLD); | ||
101 | } | ||
102 | # ifdef OLED_DRIVER_ENABLE | 97 | # ifdef OLED_DRIVER_ENABLE |
103 | oled_timer = timer_read32(); | 98 | oled_timer = timer_read32(); |
104 | # endif | 99 | # endif |
@@ -108,5 +103,12 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) { | |||
108 | # ifdef HAPTIC_ENABLE | 103 | # ifdef HAPTIC_ENABLE |
109 | if (haptic_config.enable) haptic_play(); | 104 | if (haptic_config.enable) haptic_play(); |
110 | # endif | 105 | # endif |
106 | if (!encoder_update_user(index, clockwise)) return false; | ||
107 | if (clockwise) { | ||
108 | tap_code16(KC_VOLU); | ||
109 | } else { | ||
110 | tap_code16(KC_VOLD); | ||
111 | } | ||
112 | return true; | ||
111 | } | 113 | } |
112 | #endif | 114 | #endif |