diff --git a/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs b/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs index 87df2da2c..397502b30 100644 --- a/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs +++ b/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs @@ -161,7 +161,9 @@ internal class SeStringRenderer : IServiceType ImFont* font = null; if (drawParams.Font.HasValue) font = drawParams.Font.Value; - if (ThreadSafety.IsMainThread && drawParams.TargetDrawList is null && font is null) + + // API14: Remove commented out code + if (ThreadSafety.IsMainThread /* && drawParams.TargetDrawList is null */ && font is null) font = ImGui.GetFont(); if (font is null) throw new ArgumentException("Specified font is empty."); diff --git a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs index 04d0501b1..5e63ef160 100644 --- a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs +++ b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs @@ -64,8 +64,20 @@ public unsafe ref struct SeStringDrawState { this.drawList = ssdp.TargetDrawList.Value; this.ScreenOffset = Vector2.Zero; - this.FontSize = ssdp.FontSize ?? throw new ArgumentException( - $"{nameof(ssdp.FontSize)} must be set when specifying a target draw list, as it cannot be fetched from the ImGui state."); + + // API14: Remove, always throw + if (ThreadSafety.IsMainThread) + { + this.FontSize = ssdp.FontSize ?? ImGui.GetFontSize(); + } + else + { + throw new ArgumentException( + $"{nameof(ssdp.FontSize)} must be set when specifying a target draw list, as it cannot be fetched from the ImGui state."); + } + + // this.FontSize = ssdp.FontSize ?? throw new ArgumentException( + // $"{nameof(ssdp.FontSize)} must be set when specifying a target draw list, as it cannot be fetched from the ImGui state."); this.WrapWidth = ssdp.WrapWidth ?? float.MaxValue; this.Color = ssdp.Color ?? uint.MaxValue; this.LinkHoverBackColor = 0; // Interactivity is unused outside the main thread.