Eco mode overclocking fix

This commit is contained in:
Serge
2023-05-07 18:10:18 +02:00
parent 2c4bdb87aa
commit 88f466103e
114 changed files with 234 additions and 5952 deletions

View File

@@ -31,8 +31,6 @@ namespace GHelper
private static long lastTheme;
private static PowerLineStatus isPlugged = PowerLineStatus.Unknown;
public static NvidiaGpuControl nvControl = new NvidiaGpuControl();
// The main entry point for the application
public static void Main(string[] args)
{
@@ -68,6 +66,8 @@ namespace GHelper
Application.EnableVisualStyles();
HardwareControl.RecreateGpuControl();
var ds = settingsForm.Handle;
trayIcon.MouseClick += TrayIcon_MouseClick;
@@ -80,8 +80,6 @@ namespace GHelper
SetAutoModes();
HardwareMonitor.RecreateGpuControl();
// Subscribing for system power change events
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
SystemEvents.UserPreferenceChanged += SystemEvents_UserPreferenceChanged;
@@ -294,7 +292,12 @@ namespace GHelper
if (action == "gpu")
{
nvControl.SetClocksFromConfig();
if (HardwareControl.GpuControl is not null)
{
NvidiaGpuControl nvcontrol = (NvidiaGpuControl)HardwareControl.GpuControl;
nvcontrol.SetClocksFromConfig();
}
settingsForm.FansToggle();
}
}