diff options
author | Bram Inniger <bram@inniger.be> | 2023-12-05 07:19:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 21:19:14 -0800 |
commit | b9a3bdb982abe1905e6c3ecb55c0e6344f95495b (patch) | |
tree | cf05659a6efa1a8feab2ad4cf997aa5353057eb1 /keyboards/splitkb/aurora/corne | |
parent | 88653c53ed4062b36a8b304244fca1a470224118 (diff) |
[Keyboard] Fix oled layer display order for Aurora boards (#22521)
Diffstat (limited to 'keyboards/splitkb/aurora/corne')
-rw-r--r-- | keyboards/splitkb/aurora/corne/corne.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/keyboards/splitkb/aurora/corne/corne.c b/keyboards/splitkb/aurora/corne/corne.c index 11ed0500ad..d95a448021 100644 --- a/keyboards/splitkb/aurora/corne/corne.c +++ b/keyboards/splitkb/aurora/corne/corne.c @@ -212,14 +212,19 @@ static void render_layer_state(void) { 0x20, 0x9d, 0x9e, 0x9f, 0x20, 0x20, 0xbd, 0xbe, 0xbf, 0x20, 0x20, 0xdd, 0xde, 0xdf, 0x20, 0}; - if(layer_state_is(_LOWER)) { - oled_write_P(lower_layer, false); - } else if(layer_state_is(_RAISE)) { - oled_write_P(raise_layer, false); - } else if(layer_state_is(_DEFAULT)) { - oled_write_P(default_layer, false); - } else { - oled_write_P(adjust_layer, false); + + switch (get_highest_layer(layer_state | default_layer_state)) { + case _LOWER: + oled_write_P(lower_layer, false); + break; + case _RAISE: + oled_write_P(raise_layer, false); + break; + case _ADJUST: + oled_write_P(adjust_layer, false); + break; + default: + oled_write_P(default_layer, false); } } |