From 74a0cbb034ee37a0bd37f8c9bfb7bff52d54c7dd Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Mon, 26 Apr 2021 22:05:49 +0200 Subject: [PATCH] fix: Remove WaitForFontRebuild during start, this breaks titleedit again for whatever reason --- Dalamud/Dalamud.cs | 8 +++----- Dalamud/Interface/InterfaceManager.cs | 3 +++ Dalamud/Interface/UiBuilder.cs | 3 +++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Dalamud/Dalamud.cs b/Dalamud/Dalamud.cs index 2dd67df90..27086df55 100644 --- a/Dalamud/Dalamud.cs +++ b/Dalamud/Dalamud.cs @@ -197,6 +197,9 @@ namespace Dalamud this.Framework = new Framework(this.SigScanner, this); Log.Information("[SPRE] Framework OK!"); + + this.Framework.Enable(); + Log.Information("[SPRE] Framework ENABLE!"); } /// @@ -254,8 +257,6 @@ namespace Dalamud isInterfaceLoaded = true; Log.Information("[SPOST] IM OK!"); - - this.InterfaceManager.WaitForFontRebuild(); } catch (Exception e) { @@ -314,9 +315,6 @@ namespace Dalamud } } - this.Framework.Enable(); - Log.Information("[SPOST] Framework ENABLE!"); - this.ClientState.Enable(); Log.Information("[SPOST] CS ENABLE!"); diff --git a/Dalamud/Interface/InterfaceManager.cs b/Dalamud/Interface/InterfaceManager.cs index 6e1e63cf5..233dfd708 100644 --- a/Dalamud/Interface/InterfaceManager.cs +++ b/Dalamud/Interface/InterfaceManager.cs @@ -68,6 +68,7 @@ namespace Dalamud.Interface /// public event RawDX11Scene.BuildUIDelegate OnDraw; + public bool FontsReady { get; set; } = false; public InterfaceManager(Dalamud dalamud, SigScanner scanner) { @@ -380,6 +381,8 @@ namespace Dalamud.Interface japaneseRangeHandle.Free(); gameRangeHandle.Free(); iconRangeHandle.Free(); + + this.FontsReady = true; } public void WaitForFontRebuild() { diff --git a/Dalamud/Interface/UiBuilder.cs b/Dalamud/Interface/UiBuilder.cs index 44f2e7259..6b05d64c1 100644 --- a/Dalamud/Interface/UiBuilder.cs +++ b/Dalamud/Interface/UiBuilder.cs @@ -197,6 +197,9 @@ namespace Dalamud.Interface (this.GposeActive && this.dalamud.Configuration.ToggleUiHideDuringGpose && !(this.DisableGposeUiHide || this.DisableAutomaticUiHide))) return; + if (!this.dalamud.InterfaceManager.FontsReady) + return; + ImGui.PushID(this.namespaceName); if (DoStats) {