diff --git a/System/Computer/Awake/Awake.v1.cs b/System/Computer/Awake/Awake.v1.cs index b16565a..804dda2 100644 --- a/System/Computer/Awake/Awake.v1.cs +++ b/System/Computer/Awake/Awake.v1.cs @@ -39,10 +39,13 @@ public static void SetIndefiniteKeepAwake(bool keepDisplayOn = false) /// /// /// - public static void SetIndefiniteKeepAwake(Action? callback, Action? failureCallback, bool keepDisplayOn = false) + public static void SetIndefiniteKeepAwake(Action callback, Action? failureCallback, bool keepDisplayOn = false) { _cts.Cancel(); + callback ??= (bool success) => { }; + failureCallback ??= () => { }; + try { if (_runnerThread != null && !_runnerThread.IsCanceled) diff --git a/System/Computer/Awake/Awake.v2.cs b/System/Computer/Awake/Awake.v2.cs index 76c4744..05cba2d 100644 --- a/System/Computer/Awake/Awake.v2.cs +++ b/System/Computer/Awake/Awake.v2.cs @@ -24,6 +24,7 @@ static Awake() { _log = LogManager.GetCurrentClassLogger(); _cts = new CancellationTokenSource(); + _stateQueue = []; StartMonitor(); } diff --git a/System/System.csproj b/System/System.csproj index 89d2bce..b898a2e 100644 --- a/System/System.csproj +++ b/System/System.csproj @@ -20,10 +20,10 @@ README.md FrenchyApps42 logo.png - 1.0.2 - 1.0.2 + 1.1.0 + 1.1.0 Implement Awake from Microsoft Powertoys - 1.0.2.1 + 1.1.0