mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-11 19:14:38 +00:00
fixes 'layer_state_cmp' when layer is '1' (aka layer 0, aka layer 1<<0)
This commit is contained in:
parent
163ddd5d15
commit
3aec9a4354
1 changed files with 2 additions and 2 deletions
|
@ -94,8 +94,8 @@ bool layer_state_is(uint8_t layer)
|
|||
}
|
||||
|
||||
bool layer_state_cmp(uint32_t cmp_layer_state, uint8_t layer) {
|
||||
if (layer == 0) { return cmp_layer_state == 0; }
|
||||
return (cmp_layer_state & (1UL<<layer)) > 0;
|
||||
if (!cmp_layer_state) { return layer == 0; }
|
||||
return (cmp_layer_state & (1UL<<layer)) != 0;
|
||||
}
|
||||
|
||||
void layer_move(uint8_t layer)
|
||||
|
|
Loading…
Reference in a new issue