diff --git a/app/Input/InputDispatcher.cs b/app/Input/InputDispatcher.cs index d6a5c0bb..2e05fd05 100644 --- a/app/Input/InputDispatcher.cs +++ b/app/Input/InputDispatcher.cs @@ -1026,6 +1026,13 @@ public static void SetScreenpad(int delta) Program.toast.RunToast($"Screen Pad {toast}", delta > 0 ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown); } + public static void InitScreenpad() + { + if (!AppConfig.IsDUO()) return; + int brightness = AppConfig.Get("screenpad"); + if (brightness >= 0) ApplyScreenpadAction(brightness); + } + static void LaunchProcess(string command = "") { if (string.IsNullOrEmpty(command)) return; diff --git a/app/Program.cs b/app/Program.cs index 7699ae4f..4ec994e9 100644 --- a/app/Program.cs +++ b/app/Program.cs @@ -231,7 +231,12 @@ public static bool SetAutoModes(bool powerChanged = false, bool init = false) Logger.WriteLine("AutoSetting for " + isPlugged.ToString()); BatteryControl.AutoBattery(init); - if (init) screenControl.InitMiniled(); + + if (init) + { + screenControl.InitMiniled(); + InputDispatcher.InitScreenpad(); + } inputDispatcher.Init();