From 80c90a6952f412defa6b3709a59507b2c76f3863 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 8 Jan 2025 08:50:54 -0800 Subject: [PATCH 1/2] [Bug] Fix Underglow keycode processing (#24798) Co-authored-by: Ryan --- quantum/process_keycode/process_underglow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quantum/process_keycode/process_underglow.c b/quantum/process_keycode/process_underglow.c index 6104cd02c6c..b8d8989ef34 100644 --- a/quantum/process_keycode/process_underglow.c +++ b/quantum/process_keycode/process_underglow.c @@ -16,7 +16,10 @@ bool process_underglow(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { - uint8_t shifted = get_mods() & MOD_MASK_SHIFT; +#if defined(RGBLIGHT_ENABLE) || (defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_SHARED_KEYCODES)) + const uint8_t shifted = get_mods() & MOD_MASK_SHIFT; +#endif + switch (keycode) { case QK_UNDERGLOW_TOGGLE: #if defined(RGBLIGHT_ENABLE) From c1565bebcef26c400801caa4447012c2b9fa0a62 Mon Sep 17 00:00:00 2001 From: HorrorTroll Date: Wed, 8 Jan 2025 23:51:28 +0700 Subject: [PATCH 2/2] Patch up issue when compile with APA102 driver (#24800) --- drivers/led/apa102.c | 2 +- drivers/led/apa102.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c index 050609263d5..6e87d48b968 100644 --- a/drivers/led/apa102.c +++ b/drivers/led/apa102.c @@ -122,7 +122,7 @@ void apa102_init(void) { gpio_set_pin_output(APA102_CI_PIN); } -void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue) { +void apa102_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { apa102_leds[index].r = red; apa102_leds[index].g = green; apa102_leds[index].b = blue; diff --git a/drivers/led/apa102.h b/drivers/led/apa102.h index 42f1344f0c9..6fa3521a3a5 100644 --- a/drivers/led/apa102.h +++ b/drivers/led/apa102.h @@ -32,7 +32,7 @@ #define APA102_MAX_BRIGHTNESS 31 void apa102_init(void); -void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue); +void apa102_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue); void apa102_flush(void);