Only write the setting if it does not exist yet.

This commit is contained in:
IceStormNG
2023-07-26 23:19:36 +02:00
parent cff2c9af0b
commit dfe4bebe58

View File

@@ -99,6 +99,12 @@ namespace GHelper.Helpers
private static int CheckAndSaveLidAction() 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); int val = PowerNative.GetLidAction(true);
//If it is 0 then it is likely already set by clamshell mdoe //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? //If 0 was set by the user, then why do they even use clamshell mode?