IsUsedGPU fix

This commit is contained in:
seerge
2023-04-05 19:59:10 +02:00
parent cf3a84aa3d
commit aab1e08729
2 changed files with 27 additions and 23 deletions

View File

@@ -1064,18 +1064,19 @@ namespace GHelper
if (eco == 1)
if ((GpuAuto && Plugged == PowerLineStatus.Online) || (ForceGPU && GpuMode == ASUSWmi.GPUModeStandard))
{
if (HardwareMonitor.IsUsedGPU())
{
DialogResult dialogResult = MessageBox.Show("Your dGPU seem to be in heavy use, disable it?", "Eco Mode", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.No) return false;
}
SetEcoGPU(0);
return true;
}
if (eco == 0)
if ((GpuAuto && Plugged != PowerLineStatus.Online) || (ForceGPU && GpuMode == ASUSWmi.GPUModeEco))
{
if (HardwareMonitor.IsUsedGPU())
{
DialogResult dialogResult = MessageBox.Show("Your dGPU seem to be in heavy use, disable it?", "Eco Mode", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.No) return false;
}
SetEcoGPU(1);
return true;
}
@@ -1142,7 +1143,6 @@ namespace GHelper
public void SetEcoGPU(int eco)
{
ButtonEnabled(buttonOptimized, false);
ButtonEnabled(buttonEco, false);
ButtonEnabled(buttonStandard, false);