From ff5aac78a3f77dd76b2e616f7f2e5a52f35136e1 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:29:03 +0200 Subject: [PATCH] Init --- app/AppConfig.cs | 5 +++++ app/AsusACPI.cs | 2 +- app/Input/InputDispatcher.cs | 6 +++--- app/USB/Aura.cs | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/AppConfig.cs b/app/AppConfig.cs index f888e6d3..fcd9f167 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -377,6 +377,11 @@ public static class AppConfig return ContainsModel("Vivobook") || ContainsModel("Zenbook"); } + public static bool IsVivoZenPro() + { + return ContainsModel("Vivobook") || ContainsModel("Zenbook") || ContainsModel("ProArt"); + } + // Devices with bugged bios command to change brightness public static bool SwappedBrightness() { diff --git a/app/AsusACPI.cs b/app/AsusACPI.cs index 804d5388..8bb52657 100644 --- a/app/AsusACPI.cs +++ b/app/AsusACPI.cs @@ -171,7 +171,7 @@ public class AsusACPI private bool? _allAMD = null; private bool? _overdrive = null; - public static uint GPUEco => (AppConfig.IsVivoZenbook() || AppConfig.IsProArt()) ? GPUEcoVivo : GPUEcoROG; + public static uint GPUEco => AppConfig.IsVivoZenPro() ? GPUEcoVivo : GPUEcoROG; public static uint GPUMux => AppConfig.IsVivoZenbook() ? GPUMuxVivo : GPUMuxROG; [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] diff --git a/app/Input/InputDispatcher.cs b/app/Input/InputDispatcher.cs index 154baac3..baf78f15 100644 --- a/app/Input/InputDispatcher.cs +++ b/app/Input/InputDispatcher.cs @@ -85,7 +85,7 @@ namespace GHelper.Input InitBacklightTimer(); - if (AppConfig.IsVivoZenbook()) + if (AppConfig.IsVivoZenPro()) Program.acpi.DeviceSet(AsusACPI.FnLock, AppConfig.Is("fn_lock") ^ AppConfig.IsInvertedFNLock() ? 1 : 0, "FnLock"); } @@ -155,7 +155,7 @@ namespace GHelper.Input // FN-Lock group - if (AppConfig.Is("fn_lock") && !AppConfig.IsVivoZenbook()) + if (AppConfig.Is("fn_lock") && !AppConfig.IsVivoZenPro()) for (Keys i = Keys.F1; i <= Keys.F11; i++) hook.RegisterHotKey(ModifierKeys.None, i); // Arrow-lock group @@ -597,7 +597,7 @@ namespace GHelper.Input bool fnLock = !AppConfig.Is("fn_lock"); AppConfig.Set("fn_lock", fnLock ? 1 : 0); - if (AppConfig.IsVivoZenbook()) + if (AppConfig.IsVivoZenPro()) Program.acpi.DeviceSet(AsusACPI.FnLock, fnLock ^ AppConfig.IsInvertedFNLock() ? 1 : 0, "FnLock"); else Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys); diff --git a/app/USB/Aura.cs b/app/USB/Aura.cs index f5abb49a..f5bf44c3 100644 --- a/app/USB/Aura.cs +++ b/app/USB/Aura.cs @@ -79,7 +79,7 @@ namespace GHelper.USB public static Color Color1 = Color.White; public static Color Color2 = Color.Black; - static bool isACPI = AppConfig.IsTUF() || AppConfig.IsVivoZenbook() || AppConfig.IsProArt(); + static bool isACPI = AppConfig.IsTUF() || AppConfig.IsVivoZenPro(); static bool isStrix = AppConfig.IsAdvancedRGB() && !AppConfig.IsNoDirectRGB(); static bool isStrix4Zone = AppConfig.Is4ZoneRGB();