mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-19 22:37:43 +01:00
Add ITextureProvider.CreateFromExistingTextureAsync
This commit is contained in:
parent
c86be31255
commit
1ae11440aa
8 changed files with 612 additions and 22 deletions
|
|
@ -692,12 +692,21 @@ public static class Util
|
|||
/// Throws a corresponding exception if <see cref="HRESULT.FAILED"/> is true.
|
||||
/// </summary>
|
||||
/// <param name="hr">The result value.</param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static void ThrowOnError(this HRESULT hr)
|
||||
{
|
||||
if (hr.FAILED)
|
||||
Marshal.ThrowExceptionForHR(hr.Value);
|
||||
}
|
||||
|
||||
/// <summary>Determines if the specified instance of <see cref="ComPtr{T}"/> points to null.</summary>
|
||||
/// <param name="f">The pointer.</param>
|
||||
/// <typeparam name="T">The COM interface type from TerraFX.</typeparam>
|
||||
/// <returns><c>true</c> if not empty.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static unsafe bool IsEmpty<T>(in this ComPtr<T> f) where T : unmanaged, IUnknown.Interface =>
|
||||
f.Get() is null;
|
||||
|
||||
/// <summary>
|
||||
/// Calls <see cref="TaskCompletionSource.SetException(System.Exception)"/> if the task is incomplete.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue