Skip to content

Commit

Permalink
Readded lost pgm_read_word code to encoder array lookups (qmk#7577)
Browse files Browse the repository at this point in the history
  • Loading branch information
XScorpion2 authored and kujawakk committed Apr 21, 2020
1 parent ba369e5 commit f023354
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keyboards/rgbkb/sol/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,12 @@ void encoder_update_user(uint8_t index, bool clockwise) {
#endif
{
uint8_t layer = biton32(layer_state);
uint16_t keycode = encoders[layer][index][clockwise];
uint16_t keycode = pgm_read_word(&encoders[layer][index][clockwise]);
while (keycode == KC_TRANSPARENT && layer > 0)
{
layer--;
if ((layer_state & (1 << layer)) != 0)
keycode = encoders[layer][index][clockwise];
keycode = pgm_read_word(&encoders[layer][index][clockwise]);
}
if (keycode != KC_TRANSPARENT)
tap_code16(keycode);
Expand Down

0 comments on commit f023354

Please sign in to comment.