mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Vivobook Eco mode #2847
This commit is contained in:
@@ -66,7 +66,7 @@ public class AsusACPI
|
||||
public const uint PerformanceMode = 0x00120075; // Performance modes
|
||||
public const uint VivoBookMode = 0x00110019; // Vivobook performance modes
|
||||
|
||||
public const uint GPUEco = 0x00090020;
|
||||
public const uint GPUEcoROG = 0x00090020;
|
||||
public const uint GPUEcoVivo = 0x00090120;
|
||||
|
||||
public const uint GPUXGConnected = 0x00090018;
|
||||
@@ -171,7 +171,7 @@ public class AsusACPI
|
||||
private bool? _allAMD = null;
|
||||
private bool? _overdrive = null;
|
||||
|
||||
public static uint GPUEcoEndpoint => AppConfig.IsVivoZenbook() ? GPUEcoVivo : GPUEco;
|
||||
public static uint GPUEco => AppConfig.IsVivoZenbook() ? GPUEcoVivo : GPUEcoROG;
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
private static extern IntPtr CreateFile(
|
||||
@@ -447,7 +447,7 @@ public class AsusACPI
|
||||
|
||||
public int SetGPUEco(int eco)
|
||||
{
|
||||
uint ecoEndpoint = GPUEcoEndpoint;
|
||||
uint ecoEndpoint = GPUEco;
|
||||
|
||||
int ecoFlag = DeviceGet(ecoEndpoint);
|
||||
if (ecoFlag < 0) return -1;
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace GHelper
|
||||
labelFNV.Visible = comboFNV.Visible = textFNV.Visible = false;
|
||||
}
|
||||
|
||||
if (Program.acpi.DeviceGet(AsusACPI.GPUEcoEndpoint) < 0)
|
||||
if (Program.acpi.DeviceGet(AsusACPI.GPUEco) < 0)
|
||||
{
|
||||
checkGpuApps.Visible = false;
|
||||
checkUSBC.Visible = false;
|
||||
|
||||
@@ -571,7 +571,7 @@ namespace GHelper
|
||||
public void InitGPU()
|
||||
{
|
||||
|
||||
if (Program.acpi.DeviceGet(AsusACPI.GPUEcoEndpoint) == 1)
|
||||
if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1)
|
||||
{
|
||||
gpuVisible = buttonGPU.Visible = false;
|
||||
return;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace GHelper.Gpu
|
||||
|
||||
public void InitGPUMode()
|
||||
{
|
||||
int eco = Program.acpi.DeviceGet(AsusACPI.GPUEcoEndpoint);
|
||||
int eco = Program.acpi.DeviceGet(AsusACPI.GPUEco);
|
||||
int mux = Program.acpi.DeviceGet(AsusACPI.GPUMux);
|
||||
|
||||
if (mux < 0) mux = Program.acpi.DeviceGet(AsusACPI.GPUMuxVivo);
|
||||
@@ -205,7 +205,7 @@ namespace GHelper.Gpu
|
||||
|
||||
if (!GpuAuto && !ForceGPU) return false;
|
||||
|
||||
int eco = Program.acpi.DeviceGet(AsusACPI.GPUEcoEndpoint);
|
||||
int eco = Program.acpi.DeviceGet(AsusACPI.GPUEco);
|
||||
int mux = Program.acpi.DeviceGet(AsusACPI.GPUMux);
|
||||
|
||||
if (mux == 0)
|
||||
|
||||
@@ -356,7 +356,7 @@ namespace GHelper.Mode
|
||||
if (core == -1 && memory == -1 && clock_limit == -1) return;
|
||||
//if ((gpu_core > -5 && gpu_core < 5) && (gpu_memory > -5 && gpu_memory < 5)) launchAsAdmin = false;
|
||||
|
||||
if (Program.acpi.DeviceGet(AsusACPI.GPUEcoEndpoint) == 1) { Logger.WriteLine("Clocks: Eco"); return; }
|
||||
if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1) { Logger.WriteLine("Clocks: Eco"); return; }
|
||||
if (HardwareControl.GpuControl is null) { Logger.WriteLine("Clocks: NoGPUControl"); return; }
|
||||
if (!HardwareControl.GpuControl!.IsNvidia) { Logger.WriteLine("Clocks: NotNvidia"); return; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user