1
0
Fork 0

Cut the memory consumption of PREVENT_STUCK_MODIFIERS in half

This commit is contained in:
Wojciech Siewierski 2016-03-27 23:50:07 +02:00
parent a5cdc3aab1
commit b4f442dfea
4 changed files with 16 additions and 11 deletions

View file

@ -55,7 +55,7 @@ void action_exec(keyevent_t event)
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
bool disable_action_cache = false;
action_t pressed_actions_cache[MATRIX_ROWS][MATRIX_COLS];
int8_t pressed_actions_cache[MATRIX_ROWS][MATRIX_COLS];
void process_action_nocache(keyrecord_t *record)
{
@ -84,9 +84,9 @@ action_t store_or_get_action(bool pressed, keypos_t key)
}
if (pressed) {
pressed_actions_cache[key.row][key.col] = layer_switch_get_action(key);
pressed_actions_cache[key.row][key.col] = layer_switch_get_layer(key);
}
return pressed_actions_cache[key.row][key.col];
return action_for_key(pressed_actions_cache[key.row][key.col], key);
#else
return layer_switch_get_action(key);
#endif