diff --git a/app/AppConfig.cs b/app/AppConfig.cs index af55f002..d0da418c 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -657,4 +657,9 @@ public static class AppConfig return IsSlash() || ContainsModel("JIR") || ContainsModel("JZR") || ContainsModel("JVR") || ContainsModel("JYR") || ContainsModel("FA607P") || ContainsModel("FX607J") || ContainsModel("FA507U"); } + public static bool IsForceMiniled() + { + return ContainsModel("G843JYR") || Is("force_miniled"); + } + } diff --git a/app/Display/ScreenControl.cs b/app/Display/ScreenControl.cs index ca3b92e1..1105fbfd 100644 --- a/app/Display/ScreenControl.cs +++ b/app/Display/ScreenControl.cs @@ -60,6 +60,13 @@ namespace GHelper.Display } } + SetMiniled(miniled); + + InitScreen(); + } + + public void SetMiniled(int miniled = -1) + { if (miniled >= 0) { if (Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1) >= 0) @@ -70,8 +77,12 @@ namespace GHelper.Display Thread.Sleep(100); } } + } - InitScreen(); + public void InitMiniled() + { + if (AppConfig.IsForceMiniled()) + SetMiniled(AppConfig.Get("miniled")); } public void ToogleFHD() diff --git a/app/Helpers/ClamshellModeControl.cs b/app/Helpers/ClamshellModeControl.cs index c1f6793b..49d27bba 100644 --- a/app/Helpers/ClamshellModeControl.cs +++ b/app/Helpers/ClamshellModeControl.cs @@ -108,6 +108,9 @@ namespace GHelper.Helpers if (Program.settingsForm.Visible) Program.screenControl.InitScreen(); + if (AppConfig.IsForceMiniled()) + Program.screenControl.InitMiniled(); + } private static int CheckAndSaveLidAction() diff --git a/app/Program.cs b/app/Program.cs index a0a19fa3..e6387046 100644 --- a/app/Program.cs +++ b/app/Program.cs @@ -218,6 +218,7 @@ namespace GHelper Logger.WriteLine("AutoSetting for " + isPlugged.ToString()); BatteryControl.AutoBattery(init); + if (init) screenControl.InitMiniled(); inputDispatcher.Init();