mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
don't log imgui asserts unless we've shown them this session
This commit is contained in:
parent
27b6dfcbea
commit
da8be03124
1 changed files with 8 additions and 0 deletions
|
|
@ -24,6 +24,8 @@ internal class AssertHandler : IDisposable
|
|||
// Store callback to avoid it from being GC'd
|
||||
private readonly AssertCallbackDelegate callback;
|
||||
|
||||
private bool everShownAssertThisSession = false;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AssertHandler"/> class.
|
||||
/// </summary>
|
||||
|
|
@ -76,6 +78,10 @@ internal class AssertHandler : IDisposable
|
|||
if (this.ignoredAsserts.Contains(key))
|
||||
return;
|
||||
|
||||
// Don't log unless we've ever shown an assert this session
|
||||
if (!this.ShowAsserts && !this.everShownAssertThisSession)
|
||||
return;
|
||||
|
||||
Lazy<string> stackTrace = new(() => new StackTrace(3).ToString());
|
||||
|
||||
if (!this.EnableVerboseLogging)
|
||||
|
|
@ -110,6 +116,8 @@ internal class AssertHandler : IDisposable
|
|||
if (!this.ShowAsserts)
|
||||
return;
|
||||
|
||||
this.everShownAssertThisSession = true;
|
||||
|
||||
string? GetRepoUrl()
|
||||
{
|
||||
// TODO: implot, imguizmo?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue