diff --git a/app/USB/Aura.cs b/app/USB/Aura.cs index 02e347e83..d5faf33f0 100644 --- a/app/USB/Aura.cs +++ b/app/USB/Aura.cs @@ -73,6 +73,8 @@ public static class Aura private static AuraMode mode = AuraMode.AuraStatic; private static AuraSpeed speed = AuraSpeed.Normal; + private static int _brightness = 0; + public static Color Color1 = Color.White; public static Color Color2 = Color.Black; @@ -289,6 +291,8 @@ public static void Init() public static void ApplyBrightness(int brightness, string log = "Backlight", bool delay = false) { + _brightness = brightness; + Task.Run(async () => { if (delay) await Task.Delay(TimeSpan.FromSeconds(1)); @@ -494,6 +498,8 @@ public static void ApplyPower() public static void ApplyDirect(Color[] color, bool init = false) { + if (_brightness <= 0) return; + const byte keySet = 167; const byte ledCount = 178; const ushort mapSize = 3 * ledCount; @@ -574,6 +580,8 @@ public static void ApplyDirect(Color[] color, bool init = false) public static void ApplyDirect(Color color, bool init = false) { + if (_brightness <= 0) return; + if (isACPI) { Program.acpi.TUFKeyboardRGB(0, color, 0, null); @@ -721,6 +729,8 @@ public static void ApplyHeatmap(bool init = false) public static void ApplyAmbient(bool init = false) { + if (_brightness <= 0) return; + var bound = Screen.GetBounds(Point.Empty); bound.Y += bound.Height / 3; bound.Height -= (int)Math.Round(bound.Height * (0.33f + 0.022f)); // cut 1/3 of the top screen + windows panel