From 6978689f3d7fd3bdec8637811c0c3b3ce2faf22e Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sun, 14 Apr 2024 18:35:25 +0200 Subject: [PATCH] TDP fixes --- app/Ally/AllyControl.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Ally/AllyControl.cs b/app/Ally/AllyControl.cs index 662f0963..6f21ec07 100644 --- a/app/Ally/AllyControl.cs +++ b/app/Ally/AllyControl.cs @@ -299,16 +299,16 @@ namespace GHelper.Ally return autoTDP; } - private void SetTDP(int tdp) + private void SetTDP(int tdp, float fps) { if (tdp < minTDP) tdp = minTDP; if (tdp > maxTDP) tdp = maxTDP; if (tdp == autoTDP) return; - Program.acpi.DeviceSet(AsusACPI.PPT_APUA0, tdp, "AutoTDP"); - Program.acpi.DeviceSet(AsusACPI.PPT_APUA3, tdp, "AutoTDP"); - Program.acpi.DeviceSet(AsusACPI.PPT_APUC1, tdp, "AutoTDP"); + Program.acpi.DeviceSet(AsusACPI.PPT_APUA0, tdp, $"AutoTDP {fps}"); + Program.acpi.DeviceSet(AsusACPI.PPT_APUA3, tdp, null); + Program.acpi.DeviceSet(AsusACPI.PPT_APUC1, tdp, null); autoTDP = tdp; } @@ -318,13 +318,13 @@ namespace GHelper.Ally if (fpsLimit <= 120) { - if (fps < fpsLimit - 4) + if (fps <= fpsLimit - 4) { - SetTDP(GetTDP() - 1); + SetTDP(GetTDP() + 1, fps); } - else if (fps > fpsLimit - 1) + else if (fps >= fpsLimit - 1) { - SetTDP(GetTDP() + 1); + SetTDP(GetTDP() - 1, fps); } }