mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Optimized mode switch from Ultimate
This commit is contained in:
@@ -145,7 +145,7 @@ namespace GHelper.Gpu
|
||||
if (status == 0 && eco == 1 && hardWay) RestartGPU();
|
||||
|
||||
await Task.Delay(TimeSpan.FromMilliseconds(100));
|
||||
|
||||
|
||||
settings.Invoke(delegate
|
||||
{
|
||||
InitGPUMode();
|
||||
@@ -173,7 +173,7 @@ namespace GHelper.Gpu
|
||||
|
||||
}
|
||||
|
||||
public bool AutoGPUMode()
|
||||
public bool AutoGPUMode(bool optimized = false)
|
||||
{
|
||||
|
||||
bool GpuAuto = AppConfig.Is("gpu_auto");
|
||||
@@ -186,8 +186,11 @@ namespace GHelper.Gpu
|
||||
int eco = Program.acpi.DeviceGet(AsusACPI.GPUEco);
|
||||
int mux = Program.acpi.DeviceGet(AsusACPI.GPUMux);
|
||||
|
||||
if (mux == 0) // GPU in Ultimate, ignore
|
||||
if (mux == 0)
|
||||
{
|
||||
if (optimized) SetGPUMode(AsusACPI.GPUModeStandard);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
@@ -34,8 +34,9 @@ public class Startup
|
||||
|
||||
using (TaskDefinition td = TaskService.Instance.NewTask())
|
||||
{
|
||||
|
||||
td.RegistrationInfo.Description = "G-Helper Auto Start";
|
||||
td.Triggers.Add(new LogonTrigger { UserId = userId });
|
||||
td.Triggers.Add(new LogonTrigger { UserId = userId, Delay = TimeSpan.FromSeconds(1) });
|
||||
td.Actions.Add(strExeFilePath);
|
||||
|
||||
if (ProcessHelper.IsUserAdministrator())
|
||||
|
||||
@@ -419,13 +419,6 @@ namespace GHelper
|
||||
}
|
||||
|
||||
|
||||
private void ButtonOptimized_Click(object? sender, EventArgs e)
|
||||
{
|
||||
AppConfig.Set("gpu_auto", (AppConfig.Get("gpu_auto") == 1) ? 0 : 1);
|
||||
VisualiseGPUMode();
|
||||
gpuControl.AutoGPUMode();
|
||||
}
|
||||
|
||||
private void ButtonScreenAuto_Click(object? sender, EventArgs e)
|
||||
{
|
||||
AppConfig.Set("screen_auto", 1);
|
||||
@@ -753,6 +746,13 @@ namespace GHelper
|
||||
}
|
||||
|
||||
|
||||
private void ButtonOptimized_Click(object? sender, EventArgs e)
|
||||
{
|
||||
AppConfig.Set("gpu_auto", (AppConfig.Get("gpu_auto") == 1) ? 0 : 1);
|
||||
VisualiseGPUMode();
|
||||
gpuControl.AutoGPUMode(true);
|
||||
}
|
||||
|
||||
private void ButtonStopGPU_Click(object? sender, EventArgs e)
|
||||
{
|
||||
gpuControl.KillGPUApps();
|
||||
|
||||
Reference in New Issue
Block a user