Skip to content

Commit

Permalink
Flicker free dimming hotkey fix #3152
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Sep 22, 2024
1 parent 80fbee2 commit afa6dbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Display/VisualControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public static int GetBrightness()
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);
Expand Down

0 comments on commit afa6dbb

Please sign in to comment.