* Fix DtrBar

* Zero some things

* Update FFXIVClientStructs
This commit is contained in:
Cara 2023-10-04 03:18:37 +10:30 committed by GitHub
parent e3aa0b2141
commit b2b366032b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -417,7 +417,7 @@ internal sealed unsafe class DtrBar : IDisposable, IServiceType, IDtrBar
private AtkTextNode* MakeNode(uint nodeId)
{
var newTextNode = IMemorySpace.GetUISpace()->Create<AtkTextNode>();
var newTextNode = AtkUldManager.CreateAtkTextNode();
if (newTextNode == null)
{
Log.Debug("Failed to allocate memory for AtkTextNode");
@ -443,6 +443,16 @@ internal sealed unsafe class DtrBar : IDisposable, IServiceType, IDtrBar
newTextNode->TextColor = new ByteColor { R = 255, G = 255, B = 255, A = 255 };
newTextNode->EdgeColor = new ByteColor { R = 142, G = 106, B = 12, A = 255 };
// Memory is filled with random data after being created, zero out some things to avoid issues.
newTextNode->UnkPtr_1 = null;
newTextNode->SelectStart = 0;
newTextNode->SelectEnd = 0;
newTextNode->FontCacheHandle = 0;
newTextNode->CharSpacing = 0;
newTextNode->BackgroundColor = new ByteColor { R = 0, G = 0, B = 0, A = 0 };
newTextNode->TextId = 0;
newTextNode->SheetType = 0;
return newTextNode;
}

@ -1 +1 @@
Subproject commit b39667d619d2446b2a03129a387e79faa7026c0f
Subproject commit a580010564e460b979bb3bc55756827229a0ebc2