From ef6990c52885311b5c35217cbf9e8b8bc58ecb66 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sat, 17 Aug 2024 12:51:41 +0200 Subject: [PATCH] Backlight controls for new Vivobooks https://github.com/seerge/g-helper/issues/2973 --- app/AsusACPI.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/AsusACPI.cs b/app/AsusACPI.cs index 7db8579c..9de7049e 100644 --- a/app/AsusACPI.cs +++ b/app/AsusACPI.cs @@ -114,9 +114,14 @@ public class AsusACPI public const int APU_MEM = 0x000600C1; public const int TUF_KB_BRIGHTNESS = 0x00050021; + public const int VIVO_KB_BRIGHTNESS = 0x0005002F; + public const int TUF_KB = 0x00100056; public const int TUF_KB2 = 0x0010005a; + public const int VIVO_KB = 0x0012008E; + public const int TUF_KB_STATE = 0x00100057; + public const int VIVO_KB_STATE = 0x0012008F; public const int MicMuteLed = 0x00040017; @@ -785,6 +790,7 @@ public class AsusACPI { int param = 0x80 | (brightness & 0x7F); DeviceSet(TUF_KB_BRIGHTNESS, param, "TUF Brightness"); + if (AppConfig.IsVivoZenPro()) DeviceSet(VIVO_KB_BRIGHTNESS, param, "VIVO Brightness"); } public void TUFKeyboardRGB(AuraMode mode, Color color, int speed, string? log = "TUF RGB") @@ -820,6 +826,7 @@ public class AsusACPI state = state | 0x01 << 8; DeviceSet(TUF_KB_STATE, state, "TUF_KB"); + if (AppConfig.IsVivoZenPro()) DeviceSet(VIVO_KB_STATE, state, "VIVO_KB"); } public void SubscribeToEvents(Action EventHandler)