From de4905f84fd8e2b148711b64b47d70f69cccdcf1 Mon Sep 17 00:00:00 2001
From: Serge <5920850+seerge@users.noreply.github.com>
Date: Tue, 15 Aug 2023 11:21:20 +0200
Subject: [PATCH] Power mode saving
https://github.com/seerge/g-helper/issues/1091
---
app/Fans.cs | 6 +++++-
app/GHelper.csproj | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/app/Fans.cs b/app/Fans.cs
index 11961077d..4240652bd 100644
--- a/app/Fans.cs
+++ b/app/Fans.cs
@@ -643,7 +643,11 @@ private void ComboPowerMode_Changed(object? sender, EventArgs e)
{
string powerMode = (string)comboPowerMode.SelectedValue;
PowerNative.SetPowerMode(powerMode);
- AppConfig.SetMode("powermode", powerMode);
+
+ if (PowerNative.GetDefaultPowerMode(Modes.GetCurrentBase()) != powerMode)
+ AppConfig.SetMode("powermode", powerMode);
+ else
+ AppConfig.RemoveMode("powermode");
}
private void ComboBoost_Changed(object? sender, EventArgs e)
diff --git a/app/GHelper.csproj b/app/GHelper.csproj
index 7f4cf1f89..c90680f81 100644
--- a/app/GHelper.csproj
+++ b/app/GHelper.csproj
@@ -15,7 +15,7 @@
AnyCPU
False
True
- 0.111
+ 0.112