From 13ec0f8911ca788e6bb4188108bab7a59615665b Mon Sep 17 00:00:00 2001 From: seerge Date: Thu, 6 Apr 2023 12:19:32 +0200 Subject: [PATCH] GPU use simplified for now --- app/HardwareMonitor.cs | 9 ++++----- app/Settings.cs | 3 --- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/HardwareMonitor.cs b/app/HardwareMonitor.cs index 9381734b..a7cf85fd 100644 --- a/app/HardwareMonitor.cs +++ b/app/HardwareMonitor.cs @@ -14,7 +14,7 @@ public static class HardwareMonitor public static string? gpuFan; public static string? midFan; - public static List gpuUsage = new List(); + //public static List gpuUsage = new List(); public static int? gpuUse; public static int GetFanMax() @@ -100,8 +100,10 @@ public static class HardwareMonitor if (gpuTemp is null || gpuTemp < 0) gpuTemp = Program.wmi.DeviceGet(ASUSWmi.Temp_GPU); + /* gpuUsage.Add(GetGpuUse()); if (gpuUsage.Count > 3) gpuUsage.RemoveAt(0); + */ try { @@ -118,10 +120,7 @@ public static class HardwareMonitor public static bool IsUsedGPU(int threshold = 50) { - if (GetGpuUse() > threshold) - return true; - else - return (gpuUsage.Average() > threshold); + return (GetGpuUse() > threshold); } public static void RecreateGpuTemperatureProviderWithDelay() diff --git a/app/Settings.cs b/app/Settings.cs index ab553674..fe49fb1e 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -845,10 +845,7 @@ namespace GHelper this.Top = Screen.FromControl(this).WorkingArea.Height - 10 - this.Height; this.Activate(); - //aTimer.Interval = 300; aTimer.Enabled = true; - - //RefreshSensors(); } else {