From 59ddc7f5687a081444c26914f48dad679d760e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 8 Dec 2024 11:12:46 +0100 Subject: [PATCH] Add wait id column --- UI/ImDebugger/ImDebugger.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/UI/ImDebugger/ImDebugger.cpp b/UI/ImDebugger/ImDebugger.cpp index ebb9c586ff..c477d2eef4 100644 --- a/UI/ImDebugger/ImDebugger.cpp +++ b/UI/ImDebugger/ImDebugger.cpp @@ -168,13 +168,14 @@ void DrawThreadView(ImConfig &cfg) { } std::vector info = GetThreadsInfo(); - if (ImGui::BeginTable("threads", 6, ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersH)) { + if (ImGui::BeginTable("threads", 7, ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersH)) { ImGui::TableSetupColumn("Name", ImGuiTableColumnFlags_WidthFixed); ImGui::TableSetupColumn("PC", ImGuiTableColumnFlags_WidthFixed); ImGui::TableSetupColumn("Entry", ImGuiTableColumnFlags_WidthFixed); ImGui::TableSetupColumn("Priority", ImGuiTableColumnFlags_WidthFixed); ImGui::TableSetupColumn("State", ImGuiTableColumnFlags_WidthFixed); ImGui::TableSetupColumn("Wait Type", ImGuiTableColumnFlags_WidthStretch); + ImGui::TableSetupColumn("Wait ID", ImGuiTableColumnFlags_WidthStretch); // .initialStack, .stackSize, etc ImGui::TableHeadersRow(); @@ -201,8 +202,14 @@ void DrawThreadView(ImConfig &cfg) { ImGui::TableNextColumn(); if (thread.waitType != WAITTYPE_NONE) { ImGui::TextUnformatted(getWaitTypeName(thread.waitType)); + } else { + ImGui::TextUnformatted("N/A"); + } + ImGui::TableNextColumn(); + switch (thread.waitType) { + default: + ImGui::TextUnformatted("N/A"); } - if (ImGui::BeginPopup("threadPopup")) { DebugThreadInfo &thread = info[i]; ImGui::Text("Thread: %s", thread.name);