From dfe4bebe58afc104f3b0153e00f0ab9af9238c83 Mon Sep 17 00:00:00 2001 From: IceStormNG Date: Wed, 26 Jul 2023 23:19:36 +0200 Subject: [PATCH] Only write the setting if it does not exist yet. --- app/Helpers/ClamshellModeControl.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Helpers/ClamshellModeControl.cs b/app/Helpers/ClamshellModeControl.cs index 9bc02461..b5c39831 100644 --- a/app/Helpers/ClamshellModeControl.cs +++ b/app/Helpers/ClamshellModeControl.cs @@ -99,6 +99,12 @@ namespace GHelper.Helpers private static int CheckAndSaveLidAction() { + if (AppConfig.Get("clamshell_default_lid_action", -1) != -1) + { + //Seting was alredy set. Do not touch it + return AppConfig.Get("clamshell_default_lid_action", -1); + } + int val = PowerNative.GetLidAction(true); //If it is 0 then it is likely already set by clamshell mdoe //If 0 was set by the user, then why do they even use clamshell mode?