From 19ebb52a5e8341b6fd5d2f4c0eabd68a48db5f02 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Fri, 29 Dec 2023 12:43:23 +0100 Subject: [PATCH] Dynamic boost https://github.com/seerge/g-helper/issues/1786 https://github.com/seerge/g-helper/issues/1806 --- app/AppConfig.cs | 9 +++++++++ app/AsusACPI.cs | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/app/AppConfig.cs b/app/AppConfig.cs index 63e70f1c..75f21d93 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -378,6 +378,15 @@ public static class AppConfig return ContainsModel("X13"); } + public static bool DynamicBoost5() + { + return ContainsModel("GZ301ZE"); + } + + public static bool DynamicBoost15() + { + return ContainsModel("FX507ZC4"); + } public static bool IsAdvantageEdition() { diff --git a/app/AsusACPI.cs b/app/AsusACPI.cs index 7d185f5f..cf3c2706 100644 --- a/app/AsusACPI.cs +++ b/app/AsusACPI.cs @@ -136,7 +136,7 @@ public class AsusACPI public const int DefaultCPU = 80; public const int MinGPUBoost = 5; - public const int MaxGPUBoost = 25; + public static int MaxGPUBoost = 25; public const int MinGPUTemp = 75; public const int MaxGPUTemp = 87; @@ -242,7 +242,11 @@ public class AsusACPI Logger.WriteLine($"Can't connect to ACPI: {ex.Message}"); } - if (AppConfig.IsAdvantageEdition()) MaxTotal = 250; + if (AppConfig.IsAdvantageEdition()) + { + MaxTotal = 250; + } + if (AppConfig.IsX13()) { MaxTotal = 75; @@ -255,6 +259,15 @@ public class AsusACPI DefaultTotal = 30; } + if (AppConfig.DynamicBoost5()) + { + MaxGPUBoost = 5; + } + + if (AppConfig.DynamicBoost15()) + { + MaxGPUBoost = 15; + } } public void Control(uint dwIoControlCode, byte[] lpInBuffer, byte[] lpOutBuffer)