From 96c85f69fe9ddf3c88595f73e730d514c436dd44 Mon Sep 17 00:00:00 2001 From: seerge Date: Fri, 3 Mar 2023 12:41:53 +0100 Subject: [PATCH] Show performance notifications only when mode changes --- ASUSWmi.cs | 2 +- Settings.cs | 4 ++-- stop-asus-sv.bat | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 stop-asus-sv.bat diff --git a/ASUSWmi.cs b/ASUSWmi.cs index efc487ea..2dde755a 100644 --- a/ASUSWmi.cs +++ b/ASUSWmi.cs @@ -30,7 +30,7 @@ public class ASUSWmi public const int PPT_CPUB0 = 0x001200B0; public const int PPT_CPUB1 = 0x001200B1; - public const int PPT_CPUA2 = 0x001200A2; + public const int PPT_CPUA2 = 0x001200A2; public const int PerformanceBalanced = 0; public const int PerformanceTurbo = 1; diff --git a/Settings.cs b/Settings.cs index 516e1432..e7be9e3c 100644 --- a/Settings.cs +++ b/Settings.cs @@ -497,7 +497,7 @@ namespace GHelper break; } - + int oldMode = Program.config.getConfig("performance_mode"); Program.config.setConfig("performance_"+(int)SystemInformation.PowerStatus.PowerLineStatus, PerformanceMode); Program.config.setConfig("performance_mode", PerformanceMode); @@ -515,7 +515,7 @@ namespace GHelper fans.ResetApplyLabel(); } - if (notify) + if (notify && (oldMode != PerformanceMode)) { try { diff --git a/stop-asus-sv.bat b/stop-asus-sv.bat new file mode 100644 index 00000000..677e1cdc --- /dev/null +++ b/stop-asus-sv.bat @@ -0,0 +1,15 @@ +sc STOP AsusAppService +sc STOP ASUSLinkNear +sc STOP ASUSLinkRemote +sc STOP ASUSSoftwareManager +sc STOP ASUSSwitch +sc STOP ASUSSystemAnalysis +sc STOP ASUSSystemDiagnosis + +sc DELETE AsusAppService +sc DELETE ASUSLinkNear +sc DELETE ASUSLinkRemote +sc DELETE ASUSSoftwareManager +sc DELETE ASUSSwitch +sc DELETE ASUSSystemAnalysis +sc DELETE ASUSSystemDiagnosis