Migrated Aura & XGM communication to HidSharp library to speed things up (#1594)

* Cleanup

* Touchpad toggle fix for FA507 https://github.com/seerge/g-helper/issues/1589

* Cleanup
This commit is contained in:
Serge
2023-11-12 22:28:37 +01:00
committed by GitHub
parent dd52f8039c
commit 5c4500315c
15 changed files with 716 additions and 735 deletions

View File

@@ -1,6 +1,7 @@
using GHelper.Display;
using GHelper.Gpu.NVidia;
using GHelper.Helpers;
using GHelper.USB;
using System.Diagnostics;
namespace GHelper.Gpu
@@ -53,7 +54,7 @@ namespace GHelper.Gpu
AppConfig.Set("gpu_mode", gpuMode);
settings.VisualiseGPUMode(gpuMode);
AsusUSB.ApplyGPUColor();
Aura.ApplyGPUColor();
}
@@ -284,7 +285,7 @@ namespace GHelper.Gpu
if (Program.acpi.IsXGConnected())
{
//Program.acpi.DeviceSet(AsusACPI.GPUXGInit, 1, "XG Init");
AsusUSB.InitXGM();
XGM.Init();
}
}
@@ -298,7 +299,7 @@ namespace GHelper.Gpu
if (Program.acpi.DeviceGet(AsusACPI.GPUXG) == 1)
{
AsusUSB.ResetXGM();
XGM.Reset();
HardwareControl.KillGPUApps();
DialogResult dialogResult = MessageBox.Show("Did you close all applications running on XG Mobile?", "Disabling XG Mobile", MessageBoxButtons.YesNo);
@@ -318,12 +319,12 @@ namespace GHelper.Gpu
InitXGM();
AsusUSB.ApplyXGMLight(AppConfig.Is("xmg_light"));
XGM.Light(AppConfig.Is("xmg_light"));
await Task.Delay(TimeSpan.FromSeconds(15));
if (AppConfig.IsMode("auto_apply"))
AsusUSB.SetXGMFan(AppConfig.GetFanConfig(AsusFan.XGM));
XGM.SetFan(AppConfig.GetFanConfig(AsusFan.XGM));
HardwareControl.RecreateGpuControl();