summaryrefslogtreecommitdiffstats
path: root/tmk_core/common/action.c
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2016-03-27 23:50:07 +0200
committerWojciech Siewierski <wojciech.siewierski@onet.pl>2016-03-27 23:51:46 +0200
commitb4f442dfeaf4d434ae0d8459dc5199cd8fefc1c7 (patch)
tree905233e4f29dddde1348b8d9a30ef46ee0b0e775 /tmk_core/common/action.c
parenta5cdc3aab1c430916eae66d4d9d751808613e700 (diff)
Cut the memory consumption of PREVENT_STUCK_MODIFIERS in half
Diffstat (limited to 'tmk_core/common/action.c')
-rw-r--r--tmk_core/common/action.c6
1 files changed, 3 insertions, 3 deletions
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