From 56ea434626f354984e1b5efebbaae7cf845a9f02 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Tue, 9 May 2023 17:16:10 +0200 Subject: [PATCH] Aura fix --- app/Aura.cs | 4 ++-- app/Settings.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Aura.cs b/app/Aura.cs index bd61fa21..aac1ecac 100644 --- a/app/Aura.cs +++ b/app/Aura.cs @@ -194,7 +194,7 @@ namespace GHelper { byte[] msg = { 0x5d, 0xba, 0xc5, 0xc4, (byte)brightness }; - var devices = GetHidDevices(new int[] { 0x19b6 }); + var devices = GetHidDevices(deviceIds); if (devices.Count() > 0) Logger.WriteLine("USB-KB = " + BitConverter.ToString(msg)); foreach (HidDevice device in devices) @@ -215,7 +215,7 @@ namespace GHelper byte[] msg = AuraDev19b6Extensions.ToBytes(flags.ToArray()); - var devices = GetHidDevices(new int[] { 0x19b6 }); + var devices = GetHidDevices(deviceIds); if (devices.Count() > 0) Logger.WriteLine("USB-KB = " + BitConverter.ToString(msg)); foreach (HidDevice device in devices) diff --git a/app/Settings.cs b/app/Settings.cs index 570640e0..9577bb3f 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -1045,7 +1045,7 @@ namespace GHelper } - public void SetGPUSettings(bool launchAsAdmin = false) + public void SetGPUSettings(bool launchAsAdmin = true) { int gpu_boost = Program.config.getConfigPerf("gpu_boost"); @@ -1067,7 +1067,7 @@ namespace GHelper Program.wmi.DeviceSet(ASUSWmi.PPT_GPUC2, gpu_temp, "PowerLimit C2"); } - if (gpu_core == -1 && gpu_memory == -1) return; + if ((gpu_core > -5 && gpu_core < 5) && (gpu_memory > -5 && gpu_memory < 5)) launchAsAdmin = false; if (HardwareControl.GpuControl is not null && HardwareControl.GpuControl.IsNvidia) { @@ -1079,7 +1079,7 @@ namespace GHelper } catch (Exception ex) { - Debug.WriteLine(ex.ToString()); + Logger.WriteLine(ex.ToString()); } }