This commit is contained in:
Serge
2024-11-11 10:36:57 +01:00
parent c2c5d2a0c5
commit 871f80f654
4 changed files with 8 additions and 3 deletions

View File

@@ -653,6 +653,11 @@ public static class AppConfig
return ContainsModel("GV301RA") || ContainsModel("GV302XA") || IsAlly(); return ContainsModel("GV301RA") || ContainsModel("GV302XA") || IsAlly();
} }
public static bool NoGpu()
{
return Is("no_gpu") || ContainsModel("UX540");
}
public static bool IsHardwareTouchpadToggle() public static bool IsHardwareTouchpadToggle()
{ {
return ContainsModel("FA507"); return ContainsModel("FA507");

View File

@@ -62,8 +62,7 @@ public class AmdGpuControl : IGpuControl
public AmdGpuControl() public AmdGpuControl()
{ {
if (!Adl2.Load()) if (!AppConfig.NoGpu() || !Adl2.Load()) return;
return;
try try
{ {

View File

@@ -44,7 +44,7 @@ namespace GHelper.Gpu
// GPU mode not supported // GPU mode not supported
if (eco < 0 && mux < 0) if (eco < 0 && mux < 0)
{ {
if (gpuExists is null) gpuExists = Program.acpi.GetFan(AsusFan.GPU) >= 0; if (gpuExists is null) gpuExists = (!AppConfig.NoGpu()) && Program.acpi.GetFan(AsusFan.GPU) >= 0;
settings.HideGPUModes((bool)gpuExists); settings.HideGPUModes((bool)gpuExists);
} }
} }

View File

@@ -285,6 +285,7 @@ public static class HardwareControl
public static void RecreateGpuControl() public static void RecreateGpuControl()
{ {
if (AppConfig.NoGpu()) return;
try try
{ {
GpuControl?.Dispose(); GpuControl?.Dispose();