Readded lost pgm_read_word code to encoder array lookups (#7577)

master
XScorpion2 2019-12-21 23:39:26 -06:00 committed by Drashna Jaelre
parent 376419a4f7
commit 0e2ff9b384
1 changed files with 2 additions and 2 deletions

View File

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