Removed Undervolting sliders for not supported models

This commit is contained in:
Serge
2023-07-16 17:04:15 +02:00
parent e593fa3a76
commit a31303624a
3 changed files with 22 additions and 2 deletions

View File

@@ -285,6 +285,16 @@ namespace GHelper
private void VisualiseAdvanced() private void VisualiseAdvanced()
{ {
if (!RyzenControl.IsSupportedUV())
{
panelUV.Visible = panelUViGPU.Visible = false;
}
if (!RyzenControl.IsSupportedUV())
{
panelUViGPU.Visible = false;
}
labelUV.Text = trackUV.Value.ToString(); labelUV.Text = trackUV.Value.ToString();
labelUViGPU.Text = trackUViGPU.Value.ToString(); labelUViGPU.Text = trackUViGPU.Value.ToString();
labelTemp.Text = (trackTemp.Value < RyzenControl.MaxTemp) ? trackTemp.Value.ToString() + "°C" : "Default"; labelTemp.Text = (trackTemp.Value < RyzenControl.MaxTemp) ? trackTemp.Value.ToString() + "°C" : "Default";

View File

@@ -366,6 +366,8 @@ namespace GHelper.Mode
public void SetUV(int cpuUV) public void SetUV(int cpuUV)
{ {
if (!RyzenControl.IsSupportedUV()) return;
if (cpuUV >= RyzenControl.MinCPUUV && cpuUV <= RyzenControl.MaxCPUUV) if (cpuUV >= RyzenControl.MinCPUUV && cpuUV <= RyzenControl.MaxCPUUV)
{ {
var uvResult = SendCommand.set_coall(cpuUV); var uvResult = SendCommand.set_coall(cpuUV);
@@ -376,6 +378,8 @@ namespace GHelper.Mode
public void SetUViGPU(int igpuUV) public void SetUViGPU(int igpuUV)
{ {
if (!RyzenControl.IsSupportedUViGPU()) return;
if (igpuUV >= RyzenControl.MinIGPUUV && igpuUV <= RyzenControl.MaxIGPUUV) if (igpuUV >= RyzenControl.MinIGPUUV && igpuUV <= RyzenControl.MaxIGPUUV)
{ {
var iGPUResult = SendCommand.set_cogfx(igpuUV); var iGPUResult = SendCommand.set_cogfx(igpuUV);

View File

@@ -130,10 +130,16 @@ namespace Ryzen
return CPUName.Contains("AMD") || CPUName.Contains("Ryzen") || CPUName.Contains("Athlon") || CPUName.Contains("Radeon") || CPUName.Contains("AMD Custom APU 0405"); return CPUName.Contains("AMD") || CPUName.Contains("Ryzen") || CPUName.Contains("Athlon") || CPUName.Contains("Radeon") || CPUName.Contains("AMD Custom APU 0405");
} }
public static bool IsRyzen9() public static bool IsSupportedUV()
{ {
if (CPUName.Length == 0) Init(); if (CPUName.Length == 0) Init();
return CPUName.Contains("Ryzen 9"); return CPUName.Contains("Ryzen 9") || CPUName.Contains("4900H") || CPUName.Contains("4800H") || CPUName.Contains("4600H");
}
public static bool IsSupportedUViGPU()
{
if (CPUName.Length == 0) Init();
return CPUName.Contains("6900H") || CPUName.Contains("7945H") || CPUName.Contains("7845H");
} }
public static void SetAddresses() public static void SetAddresses()