mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-14 00:39:55 +02:00
Debug Log: auto-disable ImGuiDebugLogFlags_EventClipper to reduce spam.
This commit is contained in:
@ -4576,6 +4576,11 @@ void ImGui::NewFrame()
|
||||
UpdateDebugToolStackQueries();
|
||||
if (g.DebugLocateFrames > 0 && --g.DebugLocateFrames == 0)
|
||||
g.DebugLocateId = 0;
|
||||
if (g.DebugLogClipperAutoDisableFrames > 0 && --g.DebugLogClipperAutoDisableFrames == 0)
|
||||
{
|
||||
DebugLog("(Auto-disabled ImGuiDebugLogFlags_EventClipper to avoid spamming)\n");
|
||||
g.DebugLogFlags &= ~ImGuiDebugLogFlags_EventClipper;
|
||||
}
|
||||
|
||||
// Create implicit/fallback window - which we will only render it if the user has added something to it.
|
||||
// We don't use "Debug" to avoid colliding with user trying to create a "Debug" window with custom flags.
|
||||
@ -14218,7 +14223,7 @@ void ImGui::ShowDebugLogWindow(bool* p_open)
|
||||
SameLine(); CheckboxFlags("Focus", &g.DebugLogFlags, ImGuiDebugLogFlags_EventFocus);
|
||||
SameLine(); CheckboxFlags("Popup", &g.DebugLogFlags, ImGuiDebugLogFlags_EventPopup);
|
||||
SameLine(); CheckboxFlags("Nav", &g.DebugLogFlags, ImGuiDebugLogFlags_EventNav);
|
||||
SameLine(); CheckboxFlags("Clipper", &g.DebugLogFlags, ImGuiDebugLogFlags_EventClipper);
|
||||
SameLine(); if (CheckboxFlags("Clipper", &g.DebugLogFlags, ImGuiDebugLogFlags_EventClipper)) { g.DebugLogClipperAutoDisableFrames = 2; }; if (IsItemHovered()) SetTooltip("Clipper log auto-disabled after 2 frames");
|
||||
SameLine(); CheckboxFlags("IO", &g.DebugLogFlags, ImGuiDebugLogFlags_EventIO);
|
||||
|
||||
if (SmallButton("Clear"))
|
||||
|
Reference in New Issue
Block a user