From 0da6562c4df570729889690e21061229c5648b73 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 18 Jun 2022 14:37:51 -0700 Subject: Make default layer size 16-bit (#15286) Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/rgbkb/sol/keymaps/default/keymap.c | 4 ++-- keyboards/rgbkb/sol/keymaps/xyverz/keymap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards/rgbkb/sol/keymaps') diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index c82259f5ee..1ce18bc1ab 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -233,7 +233,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else #endif { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); uint16_t keycode = pgm_read_word(&encoders[layer][index][clockwise]); while (keycode == KC_TRANSPARENT && layer > 0) { @@ -325,7 +325,7 @@ static void render_status(void) { // Define layers here oled_write_P(PSTR("Layer"), false); - uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + uint8_t layer = get_highest_layer(layer_state|default_layer_state); switch (layer) { case _QWERTY: oled_write_P(PSTR("BASE "), false); diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c index bdcfbb1b93..bc0884c8e4 100644 --- a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c @@ -263,7 +263,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else #endif { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); uint16_t keycode = encoders[layer][index][clockwise]; while (keycode == KC_TRANSPARENT && layer > 0) { @@ -306,7 +306,7 @@ static void render_status(void) { // Define layers here oled_write_P(PSTR(" Layer-----"), false); - uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + uint8_t layer = layer_state ? get_highest_layer(layer_state) : get_highest_layer(default_layer_state); switch (layer) { case _DVORAK: oled_write_P(PSTR("DVRAK"), false); -- cgit v1.2.3