From 10546665f4cdc25e3405bfa108b066004d436aea Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sat, 8 Jul 2017 18:42:13 +0300 Subject: Fix uninitialized backlight_level in the Visualizer --- quantum/visualizer/visualizer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c index 68b86f590c..5b4d8d603e 100644 --- a/quantum/visualizer/visualizer.c +++ b/quantum/visualizer/visualizer.c @@ -256,6 +256,9 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) { .mods = 0xFF, .leds = 0xFFFFFFFF, .suspended = false, + #ifdef BACKLIGHT_ENABLE + .backlight_level = 0, + #endif #ifdef VISUALIZER_USER_DATA_SIZE .user_data = {0}, #endif @@ -300,6 +303,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) { else { gdispGSetPowerMode(LED_DISPLAY, powerOff); } + state.status.backlight_level = current_status.backlight_level; } #endif if (visualizer_enabled) { -- cgit v1.2.3