From 7f4720ceb613f559a8de8f64663fc8d2aebad675 Mon Sep 17 00:00:00 2001 From: Raymond Date: Mon, 9 Aug 2021 10:00:14 -0400 Subject: [PATCH] Bump ClientStructs and apply fixes --- Dalamud/Interface/Internal/UiDebug.cs | 9 ++++++--- lib/FFXIVClientStructs | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Dalamud/Interface/Internal/UiDebug.cs b/Dalamud/Interface/Internal/UiDebug.cs index 3e7310633..3a2847b99 100644 --- a/Dalamud/Interface/Internal/UiDebug.cs +++ b/Dalamud/Interface/Internal/UiDebug.cs @@ -273,8 +273,11 @@ namespace Dalamud.Interface.Internal ImGui.Text($"texture type: {texType} part_id={imageNode->PartId} part_id_count={imageNode->PartsList->PartCount}"); if (texType == TextureType.Resource) { - var texFileNamePtr = textureInfo->AtkTexture.Resource->TexFileResourceHandle->ResourceHandle.FileName; - var texString = Marshal.PtrToStringAnsi(new IntPtr(texFileNamePtr)); + var texFileNameStdString = &textureInfo->AtkTexture.Resource->TexFileResourceHandle->ResourceHandle.FileName; + var texString = texFileNameStdString->Length < 16 + ? Marshal.PtrToStringAnsi((IntPtr)texFileNameStdString->Buffer) + : Marshal.PtrToStringAnsi((IntPtr)texFileNameStdString->BufferPtr); + ImGui.Text($"texture path: {texString}"); var kernelTexture = textureInfo->AtkTexture.Resource->KernelTextureObject; @@ -327,7 +330,7 @@ namespace Dalamud.Interface.Internal var childCount = componentInfo.NodeListCount; - var objectInfo = (ULDComponentInfo*)componentInfo.Objects; + var objectInfo = (AtkUldComponentInfo*)componentInfo.Objects; if (ImGui.TreeNode($"{treePrefix}{objectInfo->ComponentType} Component Node (ptr = {(long)node:X}, component ptr = {(long)compNode->Component:X}) child count = {childCount} ###{(long)node}")) { if (ImGui.IsItemHovered()) diff --git a/lib/FFXIVClientStructs b/lib/FFXIVClientStructs index e3bec1189..cbbea8ea9 160000 --- a/lib/FFXIVClientStructs +++ b/lib/FFXIVClientStructs @@ -1 +1 @@ -Subproject commit e3bec118909b0eafdd0ee7c3312c646ce0c3f3dd +Subproject commit cbbea8ea911dda876d4a996f214f337e4db88a01