mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
GPU sliders fix
This commit is contained in:
21
app/Fans.cs
21
app/Fans.cs
@@ -83,8 +83,8 @@ namespace GHelper
|
|||||||
trackCPU.Maximum = AsusACPI.MaxCPU;
|
trackCPU.Maximum = AsusACPI.MaxCPU;
|
||||||
trackCPU.Minimum = AsusACPI.MinCPU;
|
trackCPU.Minimum = AsusACPI.MinCPU;
|
||||||
|
|
||||||
trackAPU.Maximum = AsusACPI.MaxCPU;
|
trackAPU.Maximum = AsusACPI.MaxTotal;
|
||||||
trackAPU.Minimum = AsusACPI.MinCPU;
|
trackAPU.Minimum = AsusACPI.MinTotal;
|
||||||
|
|
||||||
trackAPU.Scroll += TrackPower_Scroll;
|
trackAPU.Scroll += TrackPower_Scroll;
|
||||||
trackCPU.Scroll += TrackPower_Scroll;
|
trackCPU.Scroll += TrackPower_Scroll;
|
||||||
@@ -145,6 +145,15 @@ namespace GHelper
|
|||||||
|
|
||||||
public void InitGPU(bool readClocks = false)
|
public void InitGPU(bool readClocks = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1)
|
||||||
|
{
|
||||||
|
gpuVisible = panelGPU.Visible = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (HardwareControl.GpuControl is null) HardwareControl.RecreateGpuControl();
|
||||||
|
|
||||||
if (HardwareControl.GpuControl is not null && HardwareControl.GpuControl.IsNvidia)
|
if (HardwareControl.GpuControl is not null && HardwareControl.GpuControl.IsNvidia)
|
||||||
{
|
{
|
||||||
nvControl = (NvidiaGpuControl)HardwareControl.GpuControl;
|
nvControl = (NvidiaGpuControl)HardwareControl.GpuControl;
|
||||||
@@ -444,11 +453,9 @@ namespace GHelper
|
|||||||
if (limit_cpu < AsusACPI.MinCPU) limit_cpu = AsusACPI.MinCPU;
|
if (limit_cpu < AsusACPI.MinCPU) limit_cpu = AsusACPI.MinCPU;
|
||||||
if (limit_cpu > limit_total) limit_cpu = limit_total;
|
if (limit_cpu > limit_total) limit_cpu = limit_total;
|
||||||
|
|
||||||
if (limit_apu < 0) limit_apu = AsusACPI.DefaultCPU;
|
if (limit_apu < 0) limit_apu = AsusACPI.DefaultTotal;
|
||||||
if (limit_apu > AsusACPI.MaxCPU) limit_apu = AsusACPI.MaxCPU;
|
if (limit_apu > AsusACPI.MaxTotal) limit_apu = AsusACPI.MaxTotal;
|
||||||
if (limit_apu < AsusACPI.MinCPU) limit_apu = AsusACPI.MinCPU;
|
if (limit_apu < AsusACPI.MinTotal) limit_apu = AsusACPI.MinTotal;
|
||||||
if (limit_apu > limit_total) limit_apu = limit_total;
|
|
||||||
|
|
||||||
|
|
||||||
trackTotal.Value = limit_total;
|
trackTotal.Value = limit_total;
|
||||||
trackCPU.Value = limit_cpu;
|
trackCPU.Value = limit_cpu;
|
||||||
|
|||||||
@@ -991,8 +991,8 @@ namespace GHelper
|
|||||||
if (limit_cpu > AsusACPI.MaxCPU) return;
|
if (limit_cpu > AsusACPI.MaxCPU) return;
|
||||||
if (limit_cpu < AsusACPI.MinCPU) return;
|
if (limit_cpu < AsusACPI.MinCPU) return;
|
||||||
|
|
||||||
if (limit_apu > AsusACPI.MaxCPU) return;
|
if (limit_apu > AsusACPI.MaxTotal) return;
|
||||||
if (limit_apu < AsusACPI.MinCPU) return;
|
if (limit_apu < AsusACPI.MinTotal) return;
|
||||||
|
|
||||||
if (Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0)
|
if (Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user