Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion System/Computer/Awake/Awake.v1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ public static void SetIndefiniteKeepAwake(bool keepDisplayOn = false)
/// <param name="callback"></param>
/// <param name="failureCallback"></param>
/// <param name="keepDisplayOn"></param>
public static void SetIndefiniteKeepAwake(Action<bool>? callback, Action? failureCallback, bool keepDisplayOn = false)
public static void SetIndefiniteKeepAwake(Action<bool> callback, Action? failureCallback, bool keepDisplayOn = false)
{
_cts.Cancel();

callback ??= (bool success) => { };
failureCallback ??= () => { };

try
{
if (_runnerThread != null && !_runnerThread.IsCanceled)
Expand Down
1 change: 1 addition & 0 deletions System/Computer/Awake/Awake.v2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ static Awake()
{
_log = LogManager.GetCurrentClassLogger();
_cts = new CancellationTokenSource();
_stateQueue = [];
StartMonitor();
}

Expand Down
6 changes: 3 additions & 3 deletions System/System.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<Company>FrenchyApps42</Company>
<PackageIcon>logo.png</PackageIcon>
<Version>1.0.2</Version>
<AssemblyVersion>1.0.2</AssemblyVersion>
<Version>1.1.0</Version>
<AssemblyVersion>1.1.0</AssemblyVersion>
<PackageReleaseNotes>Implement Awake from Microsoft Powertoys</PackageReleaseNotes>
<FileVersion>1.0.2.1</FileVersion>
<FileVersion>1.1.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down