mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 05:47:43 +01:00
changes
This commit is contained in:
parent
aa35052a15
commit
f8492dc06b
18 changed files with 410 additions and 361 deletions
|
|
@ -309,10 +309,10 @@ internal sealed class DalamudAssetManager : IServiceType, IDisposable, IDalamudA
|
|||
stream.ReadExactly(buf, 0, length);
|
||||
var image = purpose switch
|
||||
{
|
||||
DalamudAssetPurpose.TextureFromPng => await tm.GetFromImageAsync(buf),
|
||||
DalamudAssetPurpose.TextureFromPng => await tm.CreateFromImageAsync(buf),
|
||||
DalamudAssetPurpose.TextureFromRaw =>
|
||||
asset.GetAttribute<DalamudAssetRawTextureAttribute>() is { } raw
|
||||
? await tm.GetFromRawAsync(raw.Specification, buf)
|
||||
? await tm.CreateFromRawAsync(raw.Specification, buf)
|
||||
: throw new InvalidOperationException(
|
||||
"TextureFromRaw must accompany a DalamudAssetRawTextureAttribute."),
|
||||
_ => null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue