diff options
author | IBNobody <ibnobody@gmail.com> | 2016-04-13 21:45:02 -0500 |
---|---|---|
committer | IBNobody <ibnobody@gmail.com> | 2016-04-13 21:45:02 -0500 |
commit | 02893a9d5c5fe42de808456d4ceb75e5b5e60a6a (patch) | |
tree | e535827da0c245d518f8f64618d719c950015030 | |
parent | 1689f275ace6258f43042d78430959d8877caea1 (diff) | |
parent | e0ddbba1ef273af2b62d4c79c2cba74169d6f1e5 (diff) | |
download | firmware-02893a9d5c5fe42de808456d4ceb75e5b5e60a6a.tar.gz firmware-02893a9d5c5fe42de808456d4ceb75e5b5e60a6a.tar.bz2 firmware-02893a9d5c5fe42de808456d4ceb75e5b5e60a6a.zip |
Merge remote-tracking branch 'refs/remotes/origin/master' into pc_planck
-rw-r--r-- | tmk_core/common/action_layer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index fc721a732..e817c0d51 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -111,7 +111,7 @@ void layer_debug(void) #endif #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) -uint8_t source_layers_cache[MAX_LAYER_BITS][(MATRIX_ROWS * MATRIX_COLS + 7) / 8] = {0}; +uint8_t source_layers_cache[(MATRIX_ROWS * MATRIX_COLS + 7) / 8][MAX_LAYER_BITS] = {0}; void update_source_layers_cache(keypos_t key, uint8_t layer) { @@ -120,9 +120,9 @@ void update_source_layers_cache(keypos_t key, uint8_t layer) const uint8_t storage_bit = key_number % 8; for (uint8_t bit_number = 0; bit_number < MAX_LAYER_BITS; bit_number++) { - source_layers_cache[bit_number][storage_row] ^= + source_layers_cache[storage_row][bit_number] ^= (-((layer & (1U << bit_number)) != 0) - ^ source_layers_cache[bit_number][storage_row]) + ^ source_layers_cache[storage_row][bit_number]) & (1U << storage_bit); } } @@ -136,7 +136,7 @@ uint8_t read_source_layers_cache(keypos_t key) for (uint8_t bit_number = 0; bit_number < MAX_LAYER_BITS; bit_number++) { layer |= - ((source_layers_cache[bit_number][storage_row] + ((source_layers_cache[storage_row][bit_number] & (1U << storage_bit)) != 0) << bit_number; } |