diff --git a/quantum/quantum.c b/quantum/quantum.c index 4d80cc1470..da48337e4b 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -881,9 +881,9 @@ void set_single_persistent_default_layer(uint8_t default_layer) { default_layer_set(1U<. #if defined(LAYER_STATE_8BIT) || ( defined(DYNAMIC_KEYMAP_ENABLE) && DYNAMIC_KEYMAP_LAYER_COUNT >= 8 ) typedef uint8_t layer_state_t; +#define get_highest_layer(state) biton8(state) #elif defined(LAYER_STATE_16BIT) typedef uint16_t layer_state_t; +#define get_highest_layer(state) biton16(state) #else typedef uint32_t layer_state_t; +#define get_highest_layer(state) biton32(state) #endif