feat: ImGuiManagedAsserts

This commit is contained in:
Raymond 2021-09-10 07:58:48 -04:00
parent 8bc4598a3c
commit dda515da85
4 changed files with 176 additions and 1 deletions

View file

@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Dalamud.Interface.Internal.ManagedAsserts;
using ImGuiNET;
using Serilog;
@ -98,8 +98,13 @@ namespace Dalamud.Interface.Windowing
#if DEBUG
// Log.Verbose($"[WS{(hasNamespace ? "/" + this.Namespace : string.Empty)}] Drawing {window.WindowName}");
#endif
var snapshot = ImGuiManagedAsserts.GetSnapshot();
window.DrawInternal();
var source = ($"{this.Namespace}::" ?? string.Empty) + window.WindowName;
ImGuiManagedAsserts.ReportProblems(source, snapshot);
}
var focusedWindow = this.windows.FirstOrDefault(x => x.IsFocused && x.RespectCloseHotkey);