From c1596da81ce66e80bc6f30bbf64f6ef468c0f346 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Sat, 26 Jun 2021 16:22:02 -0400 Subject: [PATCH] vial: update vial encoder signature to match qmk --- quantum/vial.c | 6 ++++-- quantum/vial.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/quantum/vial.c b/quantum/vial.c index 85cfe6daf6..d47fe1c549 100644 --- a/quantum/vial.c +++ b/quantum/vial.c @@ -196,7 +196,7 @@ static void exec_keycode(uint16_t keycode) { #endif } -void vial_encoder_update(uint8_t index, bool clockwise) { +bool vial_encoder_update(uint8_t index, bool clockwise) { uint16_t code; layer_state_t layers = layer_state | default_layer_state; @@ -206,12 +206,14 @@ void vial_encoder_update(uint8_t index, bool clockwise) { code = dynamic_keymap_get_encoder(i, index, clockwise); if (code != KC_TRNS) { exec_keycode(code); - return; + return true; } } } /* fall back to layer 0 */ code = dynamic_keymap_get_encoder(0, index, clockwise); exec_keycode(code); + + return true; } #endif diff --git a/quantum/vial.h b/quantum/vial.h index 5f6df86a90..f4be5a99c3 100644 --- a/quantum/vial.h +++ b/quantum/vial.h @@ -24,7 +24,7 @@ void vial_handle_cmd(uint8_t *data, uint8_t length); #ifdef VIAL_ENCODERS_ENABLE -void vial_encoder_update(uint8_t index, bool clockwise); +bool vial_encoder_update(uint8_t index, bool clockwise); #endif extern int vial_unlocked;