mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 22:07:44 +01:00
Update ITextureProvider
This commit is contained in:
parent
8e5a84792e
commit
3fe2920e92
14 changed files with 1222 additions and 498 deletions
|
|
@ -320,7 +320,7 @@ internal sealed class DalamudAssetManager : IServiceType, IDisposable, IDalamudA
|
|||
var disposeDeferred =
|
||||
this.scopedFinalizer.Add(image)
|
||||
?? throw new InvalidOperationException("Something went wrong very badly");
|
||||
return new DisposeSuppressingDalamudTextureWrap(disposeDeferred);
|
||||
return new DisposeSuppressingTextureWrap(disposeDeferred);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
@ -342,26 +342,4 @@ internal sealed class DalamudAssetManager : IServiceType, IDisposable, IDalamudA
|
|||
return Task.FromException<TOut>(exc);
|
||||
return task.ContinueWith(_ => this.TransformImmediate(task, transformer)).Unwrap();
|
||||
}
|
||||
|
||||
private class DisposeSuppressingDalamudTextureWrap : IDalamudTextureWrap
|
||||
{
|
||||
private readonly IDalamudTextureWrap innerWrap;
|
||||
|
||||
public DisposeSuppressingDalamudTextureWrap(IDalamudTextureWrap wrap) => this.innerWrap = wrap;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IntPtr ImGuiHandle => this.innerWrap.ImGuiHandle;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int Width => this.innerWrap.Width;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int Height => this.innerWrap.Height;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Dispose()
|
||||
{
|
||||
// suppressed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue