From b4f442dfeaf4d434ae0d8459dc5199cd8fefc1c7 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Sun, 27 Mar 2016 23:50:07 +0200 Subject: Cut the memory consumption of PREVENT_STUCK_MODIFIERS in half --- tmk_core/common/action.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tmk_core/common/action.c') diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index fc09383ee0..acc6d11eab 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -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 -- cgit v1.2.1