From afa6dbb5420c6c71c0a861681fad99966a0a4624 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sun, 22 Sep 2024 10:18:28 +0200 Subject: [PATCH] Flicker free dimming hotkey fix https://github.com/seerge/g-helper/issues/3152 --- app/Display/VisualControl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Display/VisualControl.cs b/app/Display/VisualControl.cs index 729a4580..f1016bbc 100644 --- a/app/Display/VisualControl.cs +++ b/app/Display/VisualControl.cs @@ -367,7 +367,7 @@ namespace GHelper.Display public static int SetBrightness(int brightness = -1, int delta = 0) { if (!AppConfig.IsOLED()) return -1; - if (brightness < 0) GetBrightness(); + if (brightness < 0) brightness = GetBrightness(); _brightness = Math.Max(0, Math.Min(100, brightness + delta)); AppConfig.Set(IsOnBattery() ? "brightness_battery" : "brightness", _brightness);