From 5a0e129f1160ee439f6be4504fb935204ae86436 Mon Sep 17 00:00:00 2001 From: Desprez Jean-Marc Date: Sun, 6 Feb 2022 17:55:16 +0100 Subject: [Bug] Fix layer_state restoration at end of dynamic macro feature (#16230) --- quantum/process_keycode/process_dynamic_macro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/process_keycode/process_dynamic_macro.c') diff --git a/quantum/process_keycode/process_dynamic_macro.c b/quantum/process_keycode/process_dynamic_macro.c index 18c8d7ca2e..0feb634014 100644 --- a/quantum/process_keycode/process_dynamic_macro.c +++ b/quantum/process_keycode/process_dynamic_macro.c @@ -82,7 +82,7 @@ void dynamic_macro_play(keyrecord_t *macro_buffer, keyrecord_t *macro_end, int8_ clear_keyboard(); - layer_state = saved_layer_state; + layer_state_set(saved_layer_state); dynamic_macro_play_user(direction); } -- cgit v1.2.3 From 63646e8906e062d1c1de3925cba70c4e3426a855 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 12 Feb 2022 10:29:31 -0800 Subject: Format code according to conventions (#16322) --- quantum/process_keycode/process_dynamic_macro.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'quantum/process_keycode/process_dynamic_macro.c') diff --git a/quantum/process_keycode/process_dynamic_macro.c b/quantum/process_keycode/process_dynamic_macro.c index 0feb634014..a1ada2d5a2 100644 --- a/quantum/process_keycode/process_dynamic_macro.c +++ b/quantum/process_keycode/process_dynamic_macro.c @@ -29,13 +29,21 @@ void dynamic_macro_led_blink(void) { /* User hooks for Dynamic Macros */ -__attribute__((weak)) void dynamic_macro_record_start_user(void) { dynamic_macro_led_blink(); } +__attribute__((weak)) void dynamic_macro_record_start_user(void) { + dynamic_macro_led_blink(); +} -__attribute__((weak)) void dynamic_macro_play_user(int8_t direction) { dynamic_macro_led_blink(); } +__attribute__((weak)) void dynamic_macro_play_user(int8_t direction) { + dynamic_macro_led_blink(); +} -__attribute__((weak)) void dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record) { dynamic_macro_led_blink(); } +__attribute__((weak)) void dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record) { + dynamic_macro_led_blink(); +} -__attribute__((weak)) void dynamic_macro_record_end_user(int8_t direction) { dynamic_macro_led_blink(); } +__attribute__((weak)) void dynamic_macro_record_end_user(int8_t direction) { + dynamic_macro_led_blink(); +} /* Convenience macros used for retrieving the debug info. All of them * need a `direction` variable accessible at the call site. -- cgit v1.2.3