mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Dynamic Boost fallback https://github.com/seerge/g-helper/issues/1834
This commit is contained in:
@@ -348,16 +348,20 @@ namespace GHelper.Mode
|
|||||||
int gpu_boost = AppConfig.GetMode("gpu_boost");
|
int gpu_boost = AppConfig.GetMode("gpu_boost");
|
||||||
int gpu_temp = AppConfig.GetMode("gpu_temp");
|
int gpu_temp = AppConfig.GetMode("gpu_temp");
|
||||||
|
|
||||||
|
int boostResult = -1;
|
||||||
|
|
||||||
if (gpu_boost < AsusACPI.MinGPUBoost || gpu_boost > AsusACPI.MaxGPUBoost) return;
|
if (gpu_boost < AsusACPI.MinGPUBoost || gpu_boost > AsusACPI.MaxGPUBoost) return;
|
||||||
if (gpu_temp < AsusACPI.MinGPUTemp || gpu_temp > AsusACPI.MaxGPUTemp) return;
|
if (gpu_temp < AsusACPI.MinGPUTemp || gpu_temp > AsusACPI.MaxGPUTemp) return;
|
||||||
|
|
||||||
if (Program.acpi.DeviceGet(AsusACPI.PPT_GPUC0) >= 0)
|
if (Program.acpi.DeviceGet(AsusACPI.PPT_GPUC0) >= 0)
|
||||||
Program.acpi.DeviceSet(AsusACPI.PPT_GPUC0, gpu_boost, "PowerLimit C0");
|
boostResult = Program.acpi.DeviceSet(AsusACPI.PPT_GPUC0, gpu_boost, "PowerLimit C0");
|
||||||
|
|
||||||
if (Program.acpi.DeviceGet(AsusACPI.PPT_GPUC2) >= 0)
|
if (Program.acpi.DeviceGet(AsusACPI.PPT_GPUC2) >= 0)
|
||||||
Program.acpi.DeviceSet(AsusACPI.PPT_GPUC2, gpu_temp, "PowerLimit C2");
|
Program.acpi.DeviceSet(AsusACPI.PPT_GPUC2, gpu_temp, "PowerLimit C2");
|
||||||
|
|
||||||
|
if (boostResult == 0)
|
||||||
|
Program.acpi.DeviceSet(AsusACPI.PPT_GPUC0, gpu_boost, "PowerLimit C0");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCPUTemp(int? cpuTemp, bool log = true)
|
public void SetCPUTemp(int? cpuTemp, bool log = true)
|
||||||
|
|||||||
Reference in New Issue
Block a user