From 47dcf2a980fd3d62d69c3d5b76a996743b376b80 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sat, 7 Sep 2024 15:04:12 +0200 Subject: [PATCH] Screenpad brightness adjustment values #3067 --- app/Input/InputDispatcher.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Input/InputDispatcher.cs b/app/Input/InputDispatcher.cs index d1eccca1..a1f575cb 100644 --- a/app/Input/InputDispatcher.cs +++ b/app/Input/InputDispatcher.cs @@ -944,7 +944,8 @@ namespace GHelper.Input Action action = (b) => { if (b >= 0) Program.acpi.DeviceSet(AsusACPI.ScreenPadToggle, 1, "ScreenpadOn"); - Program.acpi.DeviceSet(AsusACPI.ScreenPadBrightness, Math.Max(b * 255 / 100, 0), "Screenpad"); + int[] brightnessValues = [0, 4, 9, 14, 21, 32, 48, 73, 111, 169, 255]; + Program.acpi.DeviceSet(AsusACPI.ScreenPadBrightness, brightnessValues[Math.Min(brightnessValues.Length - 1, Math.Max(0, b / 10))], "Screenpad"); if (b < 0) Program.acpi.DeviceSet(AsusACPI.ScreenPadToggle, 0, "ScreenpadOff"); };