diff options
| author | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2016-03-15 16:51:50 +0100 |
|---|---|---|
| committer | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2016-03-15 16:51:50 +0100 |
| commit | a5cdc3aab1c430916eae66d4d9d751808613e700 (patch) | |
| tree | 46f5320e1bd385adad14c4507a00fb76dfb8abc5 /tmk_core/common/action.c | |
| parent | 73cb87740bd814c95007f9ef6ce3dcd542a62afd (diff) | |
| download | qmk_firmware-a5cdc3aab1c430916eae66d4d9d751808613e700.tar.gz qmk_firmware-a5cdc3aab1c430916eae66d4d9d751808613e700.zip | |
Expose the pressed_actions_cache global variable
Diffstat (limited to 'tmk_core/common/action.c')
| -rw-r--r-- | tmk_core/common/action.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 0a3822a06..fc09383ee 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c | |||
| @@ -55,6 +55,7 @@ void action_exec(keyevent_t event) | |||
| 55 | 55 | ||
| 56 | #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) | 56 | #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) |
| 57 | bool disable_action_cache = false; | 57 | bool disable_action_cache = false; |
| 58 | action_t pressed_actions_cache[MATRIX_ROWS][MATRIX_COLS]; | ||
| 58 | 59 | ||
| 59 | void process_action_nocache(keyrecord_t *record) | 60 | void process_action_nocache(keyrecord_t *record) |
| 60 | { | 61 | { |
| @@ -78,16 +79,14 @@ void process_action_nocache(keyrecord_t *record) | |||
| 78 | action_t store_or_get_action(bool pressed, keypos_t key) | 79 | action_t store_or_get_action(bool pressed, keypos_t key) |
| 79 | { | 80 | { |
| 80 | #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) | 81 | #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) |
| 81 | static action_t pressed_actions[MATRIX_ROWS][MATRIX_COLS]; | ||
| 82 | |||
| 83 | if (disable_action_cache) { | 82 | if (disable_action_cache) { |
| 84 | return layer_switch_get_action(key); | 83 | return layer_switch_get_action(key); |
| 85 | } | 84 | } |
| 86 | 85 | ||
| 87 | if (pressed) { | 86 | if (pressed) { |
| 88 | pressed_actions[key.row][key.col] = layer_switch_get_action(key); | 87 | pressed_actions_cache[key.row][key.col] = layer_switch_get_action(key); |
| 89 | } | 88 | } |
| 90 | return pressed_actions[key.row][key.col]; | 89 | return pressed_actions_cache[key.row][key.col]; |
| 91 | #else | 90 | #else |
| 92 | return layer_switch_get_action(key); | 91 | return layer_switch_get_action(key); |
| 93 | #endif | 92 | #endif |
