mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
GPU detection https://github.com/seerge/g-helper/issues/1114
Resetting custom fan curve on XGM on disconnect https://github.com/seerge/g-helper/issues/1123
This commit is contained in:
@@ -285,7 +285,9 @@ namespace GHelper.Gpu
|
|||||||
|
|
||||||
if (Program.acpi.DeviceGet(AsusACPI.GPUXG) == 1)
|
if (Program.acpi.DeviceGet(AsusACPI.GPUXG) == 1)
|
||||||
{
|
{
|
||||||
|
AsusUSB.ResetXGM();
|
||||||
HardwareControl.KillGPUApps();
|
HardwareControl.KillGPUApps();
|
||||||
|
|
||||||
DialogResult dialogResult = MessageBox.Show("Did you close all applications running on XG Mobile?", "Disabling XG Mobile", MessageBoxButtons.YesNo);
|
DialogResult dialogResult = MessageBox.Show("Did you close all applications running on XG Mobile?", "Disabling XG Mobile", MessageBoxButtons.YesNo);
|
||||||
if (dialogResult == DialogResult.Yes)
|
if (dialogResult == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
@@ -296,6 +298,8 @@ namespace GHelper.Gpu
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Program.acpi.DeviceSet(AsusACPI.GPUXG, 1, "GPU XGM");
|
Program.acpi.DeviceSet(AsusACPI.GPUXG, 1, "GPU XGM");
|
||||||
|
|
||||||
|
AsusUSB.ResetXGM();
|
||||||
AsusUSB.ApplyXGMLight(AppConfig.Is("xmg_light"));
|
AsusUSB.ApplyXGMLight(AppConfig.Is("xmg_light"));
|
||||||
|
|
||||||
await Task.Delay(TimeSpan.FromSeconds(15));
|
await Task.Delay(TimeSpan.FromSeconds(15));
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public static class HardwareControl
|
|||||||
if (fan < 0)
|
if (fan < 0)
|
||||||
{
|
{
|
||||||
fan += 65536;
|
fan += 65536;
|
||||||
if (fan <= 0 || fan > 100) return null; //nothing reasonable
|
if (fan < 0 || fan > 100) return null; //nothing reasonable
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fan > fanMax && fan <= INADEQUATE_MAX) fanMax = fan;
|
if (fan > fanMax && fan <= INADEQUATE_MAX) fanMax = fan;
|
||||||
|
|||||||
Reference in New Issue
Block a user