From 146150b1e7a649ff03b432b286698bc2042acbe9 Mon Sep 17 00:00:00 2001 From: seerge Date: Wed, 22 Feb 2023 19:30:58 +0100 Subject: [PATCH] Cleanup --- ASUSWmi.cs | 2 +- GHelper.csproj | 1 - Settings.cs | 12 +++--------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/ASUSWmi.cs b/ASUSWmi.cs index 9adf531d..3e3395f4 100644 --- a/ASUSWmi.cs +++ b/ASUSWmi.cs @@ -146,7 +146,7 @@ public class ASUSWmi byte[] args = new byte[8]; BitConverter.GetBytes((uint)DeviceID).CopyTo(args, 0); byte[] status = CallMethod(DSTS, args); - return BitConverter.ToInt32(status, 0)-65536; + return BitConverter.ToInt32(status, 0) - 65536; } public byte[] DeviceGetBuffer(uint DeviceID, int Status = 0) diff --git a/GHelper.csproj b/GHelper.csproj index 9922ab92..86be3f04 100644 --- a/GHelper.csproj +++ b/GHelper.csproj @@ -33,7 +33,6 @@ - diff --git a/Settings.cs b/Settings.cs index 93946810..89eddf31 100644 --- a/Settings.cs +++ b/Settings.cs @@ -375,12 +375,6 @@ namespace GHelper buttonBalanced.FlatAppearance.BorderSize = buttonInactive; buttonTurbo.FlatAppearance.BorderSize = buttonInactive; - string[] mode = new string[]{ - "Balanced", - "Turbo", - "Silent" - }; - switch (PerformanceMode) { case ASUSWmi.PerformanceSilent: @@ -398,13 +392,13 @@ namespace GHelper break; } - string notifTitle = "Performance Mode Changed"; - string notifBody = "Switched to: " + mode[PerformanceMode]; + Program.config.setConfig("performance_mode", PerformanceMode); try { Program.wmi.DeviceSet(ASUSWmi.PerformanceMode, PerformanceMode); - } catch + } + catch { labelPerf.Text = "Performance Mode: not supported"; }