vial: update vial encoder signature to match qmk

This commit is contained in:
Ilya Zhuravlev 2021-06-26 16:22:02 -04:00
parent a89c941828
commit c1596da81c
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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;