From e6ef219b80f2fb0adf5e8ca820fc7115ccbe1dd1 Mon Sep 17 00:00:00 2001 From: goat Date: Wed, 2 Aug 2023 18:51:26 +0200 Subject: [PATCH] feat: warn if texture changes size between reloads --- Dalamud/Interface/Internal/TextureManager.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dalamud/Interface/Internal/TextureManager.cs b/Dalamud/Interface/Internal/TextureManager.cs index 8f6f6b474..b61ad74da 100644 --- a/Dalamud/Interface/Internal/TextureManager.cs +++ b/Dalamud/Interface/Internal/TextureManager.cs @@ -294,7 +294,12 @@ internal class TextureManager : IDisposable, IServiceType, ITextureSubstitutionP if (wrap == null) throw new Exception("Could not create texture"); - info.Extents = new Vector2(wrap.Width, wrap.Height); + // TODO: We could support this, but I don't think it's worth it at the moment. + var extents = new Vector2(wrap.Width, wrap.Height); + if (info.Extents != Vector2.Zero && info.Extents != extents) + Log.Warning("Texture at {Path} changed size between reloads, this is currently not supported.", path); + + info.Extents = extents; } catch (Exception e) {