feat: also get a snapshot for Dalamud windows

This commit is contained in:
goat 2021-09-15 02:00:58 +02:00
parent 5c5ad9e2f5
commit 18e27290dc
No known key found for this signature in database
GPG key ID: F18F057873895461
2 changed files with 6 additions and 2 deletions

View file

@ -15,6 +15,7 @@ using Dalamud.Game.Gui.Internal;
using Dalamud.Game.Internal.DXGI; using Dalamud.Game.Internal.DXGI;
using Dalamud.Hooking; using Dalamud.Hooking;
using Dalamud.Hooking.Internal; using Dalamud.Hooking.Internal;
using Dalamud.Interface.Internal.ManagedAsserts;
using Dalamud.Interface.Internal.Notifications; using Dalamud.Interface.Internal.Notifications;
using Dalamud.Interface.Windowing; using Dalamud.Interface.Windowing;
using Dalamud.Utility; using Dalamud.Utility;
@ -631,7 +632,10 @@ namespace Dalamud.Interface.Internal
WindowSystem.HasAnyWindowSystemFocus = false; WindowSystem.HasAnyWindowSystemFocus = false;
WindowSystem.FocusedWindowSystemNamespace = string.Empty; WindowSystem.FocusedWindowSystemNamespace = string.Empty;
var snap = ImGuiManagedAsserts.GetSnapshot();
this.Draw?.Invoke(); this.Draw?.Invoke();
ImGuiManagedAsserts.ReportProblems("Dalamud Core", snap);
Service<NotificationManager>.Get().Draw(); Service<NotificationManager>.Get().Draw();
} }
} }

View file

@ -276,7 +276,7 @@ namespace Dalamud.Interface
ImGui.End(); ImGui.End();
} }
ImGuiManagedAsserts.ImGuiContextSnapshot? snapshot = null; ImGuiManagedAsserts.ImGuiContextSnapshot snapshot = null;
if (this.Draw != null) if (this.Draw != null)
{ {
snapshot = ImGuiManagedAsserts.GetSnapshot(); snapshot = ImGuiManagedAsserts.GetSnapshot();
@ -296,7 +296,7 @@ namespace Dalamud.Interface
} }
// Only if Draw was successful // Only if Draw was successful
if (this.Draw != null && snapshot != null) if (this.Draw != null)
{ {
ImGuiManagedAsserts.ReportProblems(this.namespaceName, snapshot); ImGuiManagedAsserts.ReportProblems(this.namespaceName, snapshot);
} }