mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-25 12:46:41 +00:00
Readded lost pgm_read_word code to encoder array lookups (#7577)
This commit is contained in:
parent
376419a4f7
commit
0e2ff9b384
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user