Merge pull request #2479 from goatcorp/api14-rollup
Some checks are pending
Build Dalamud / Build on Windows (push) Waiting to run
Build Dalamud / Check API Compatibility (push) Blocked by required conditions
Build Dalamud / Deploy dalamud-distrib staging (push) Blocked by required conditions

[api14] Rollup changes from master
This commit is contained in:
goat 2025-12-05 18:20:01 +01:00 committed by GitHub
commit 98a4c0d4fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 1057 additions and 496 deletions

View file

@ -238,12 +238,17 @@ internal abstract class FontHandle : IFontHandle
}
/// <inheritdoc/>
public Task<IFontHandle> WaitAsync()
public Task<IFontHandle> WaitAsync() => this.WaitAsync(CancellationToken.None);
/// <inheritdoc/>
public Task<IFontHandle> WaitAsync(CancellationToken cancellationToken)
{
if (this.Available)
return Task.FromResult<IFontHandle>(this);
var tcs = new TaskCompletionSource<IFontHandle>(TaskCreationOptions.RunContinuationsAsynchronously);
cancellationToken.Register(() => tcs.TrySetCanceled());
this.ImFontChanged += OnImFontChanged;
this.Disposed += OnDisposed;
if (this.Available)