-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preview 1.82.16 Hotfix Release (#679)
# What's changed? - 1.82.16 - **[Fix]** Errors when updating game that uses HDiff, by @neon-nyan - **[Imp]** Update dependencies, by @neon-nyan - **[Imp]** Reduce CPU overhead by swapping ``SoftwareBitmap`` to ``CanvasDevice`` and ``CanvasBitmap`` to draw video frames while "Acrylic Effect" mode enabled. - This reduces CPU overhead by removing routines to copy the video frames from software-based ``SoftwareBitmap``, and instead use Direct3D-based ``CanvasBitmap`` as the frame source. - However, this improvement still runs single-threaded due to the copy routine still being done on the same thread as the UI thread. - **[Imp]** Execute metadata config download and loading in parallel. - Instead of running the metadata download/update/load routine sequentially, the process will now be running in parallel at the same time. Making the metadata loading runs faster. - **[Imp]** Reduce UI hangs while switching between regions. ### Templates <details> <summary>Changelog Prefixes</summary> ``` **[New]** **[Imp]** **[Fix]** **[Loc]** **[Doc]** ``` </details>
- Loading branch information
Showing
159 changed files
with
2,684 additions
and
2,148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
CollapseLauncher/Classes/Extension/TaskExtensions.TaskAwaitable.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using System.Runtime.CompilerServices; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
// ReSharper disable UnusedMember.Global | ||
|
||
#nullable enable | ||
namespace CollapseLauncher.Extension | ||
{ | ||
public delegate ConfiguredTaskAwaitable<TResult?> ActionTimeoutTaskAwaitableCallback<TResult>(CancellationToken token); | ||
|
||
internal static partial class TaskExtensions | ||
{ | ||
internal static Task<TResult?> | ||
WaitForRetryAsync<TResult>(this ActionTimeoutTaskAwaitableCallback<TResult?> funcCallback, | ||
int? timeout = null, | ||
int? timeoutStep = null, | ||
int? retryAttempt = null, | ||
ActionOnTimeOutRetry? actionOnRetry = null, | ||
CancellationToken fromToken = default) | ||
=> WaitForRetryAsync(() => funcCallback, timeout, timeoutStep, retryAttempt, actionOnRetry, fromToken); | ||
|
||
internal static async Task<TResult?> | ||
WaitForRetryAsync<TResult>(Func<ActionTimeoutTaskAwaitableCallback<TResult?>> funcCallback, | ||
int? timeout = null, | ||
int? timeoutStep = null, | ||
int? retryAttempt = null, | ||
ActionOnTimeOutRetry? actionOnRetry = null, | ||
CancellationToken fromToken = default) | ||
=> await WaitForRetryAsync(funcCallback.AsTaskCallback, | ||
timeout, | ||
timeoutStep, | ||
retryAttempt, | ||
actionOnRetry, | ||
fromToken); | ||
|
||
private static ActionTimeoutTaskCallback<TResult?> AsTaskCallback<TResult>(this Func<ActionTimeoutTaskAwaitableCallback<TResult?>> func) => | ||
async ctx => | ||
{ | ||
ActionTimeoutTaskAwaitableCallback<TResult?> callback = func.Invoke(); | ||
ConfiguredTaskAwaitable<TResult?> callbackAwaitable = callback.Invoke(ctx); | ||
return await callbackAwaitable; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.