From 8884b0d8440be38c9c95ffd209cd2a2bf88c124b Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sat, 27 Jan 2024 11:50:13 +0100 Subject: [PATCH] XBox controller toggle --- app/Ally/AllyControl.cs | 9 --------- app/AppConfig.cs | 5 +++++ app/AsusACPI.cs | 7 ++++++- app/Settings.cs | 5 ----- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/app/Ally/AllyControl.cs b/app/Ally/AllyControl.cs index 2aea8195..f8aec50e 100644 --- a/app/Ally/AllyControl.cs +++ b/app/Ally/AllyControl.cs @@ -603,14 +603,5 @@ namespace GHelper.Ally } } - public void ToggleXBox() - { - bool status = !AppConfig.IsNotFalse("controller_xbox"); - AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xD1, 0x0B, 0x01, status ? (byte)0x01 : (byte)0x02 }, "XBox"); - AppConfig.Set("controller_xbox", status ? 1 : 0); - - settings.VisualiseXBox(status); - } - } } diff --git a/app/AppConfig.cs b/app/AppConfig.cs index 725d5151..1456c10a 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -412,6 +412,11 @@ public static class AppConfig return ContainsModel("X13"); } + public static bool IsG14AMD() + { + return ContainsModel("GA402R"); + } + public static bool DynamicBoost5() { return ContainsModel("GZ301ZE"); diff --git a/app/AsusACPI.cs b/app/AsusACPI.cs index e5bde3e5..7430cb6e 100644 --- a/app/AsusACPI.cs +++ b/app/AsusACPI.cs @@ -133,7 +133,7 @@ public class AsusACPI public const int MinTotal = 5; public static int MaxTotal = 150; - public static int DefaultTotal = 125; + public static int DefaultTotal = 80; public const int MinCPU = 5; public const int MaxCPU = 100; @@ -251,6 +251,11 @@ public class AsusACPI MaxTotal = 250; } + if (AppConfig.IsG14AMD()) + { + DefaultTotal = 125; + } + if (AppConfig.IsX13()) { MaxTotal = 75; diff --git a/app/Settings.cs b/app/Settings.cs index b9d4b84a..65f64a5b 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -314,11 +314,6 @@ namespace GHelper } } - public void VisualiseXBox(bool status) - { - - } - public void VisualiseBacklight(int backlight) { buttonBacklight.Text = Math.Round((double)backlight*33.33).ToString() + "%";