From 2c49cae1e291806d1cb36b821f91f455637b32ef Mon Sep 17 00:00:00 2001 From: kotcrab <4594081+kotcrab@users.noreply.github.com> Date: Fri, 15 Nov 2024 20:27:23 +0100 Subject: [PATCH] Struct viewer, fix build Fix open check --- Common/GhidraClient.h | 6 ++++-- UI/ImDebugger/ImDebugger.cpp | 2 +- UI/ImDebugger/ImStructViewer.cpp | 8 +++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Common/GhidraClient.h b/Common/GhidraClient.h index 1884e4a194..2746c99f6e 100644 --- a/Common/GhidraClient.h +++ b/Common/GhidraClient.h @@ -1,9 +1,11 @@ #pragma once -#include +#include #include -#include +#include +#include #include +#include struct GhidraSymbol { u32 address = 0; diff --git a/UI/ImDebugger/ImDebugger.cpp b/UI/ImDebugger/ImDebugger.cpp index 15e5c12bf0..c5d606c6ef 100644 --- a/UI/ImDebugger/ImDebugger.cpp +++ b/UI/ImDebugger/ImDebugger.cpp @@ -413,7 +413,7 @@ void ImDebugger::Frame(MIPSDebugInterface *mipsDebug) { DrawHLEModules(cfg_); - if (&cfg_.structViewerOpen) { + if (cfg_.structViewerOpen) { structViewer_.Draw(mipsDebug, &cfg_.structViewerOpen); } } diff --git a/UI/ImDebugger/ImStructViewer.cpp b/UI/ImDebugger/ImStructViewer.cpp index 84d1701a10..03246831ec 100644 --- a/UI/ImDebugger/ImStructViewer.cpp +++ b/UI/ImDebugger/ImStructViewer.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "ext/imgui/imgui.h" @@ -369,8 +370,9 @@ void ImStructViewer::DrawNewWatchEntry() { ImGui::InputText("Expression", newWatch_.expression, IM_ARRAYSIZE(newWatch_.expression)); ImGui::SameLine(); ImGui::Checkbox("Dynamic", &newWatch_.dynamic); - if (ImGui::IsItemHovered(ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_DelayNormal)) + if (ImGui::IsItemHovered(ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_DelayNormal)) { ImGui::SetTooltip("When checked the expression will be\nre-evaluated on each frame."); + } ImGui::PopItemWidth(); @@ -399,8 +401,8 @@ void ImStructViewer::DrawNewWatchEntry() { newWatch_.dynamic = false; newWatch_.error = ""; newWatch_.typeFilter.Clear(); - // Not clearing the actual selected type on purpose here, user will have to reselect one anyway and maybe - // there is a chance they will reuse the current one + // Not clearing the actual selected type on purpose here, user will have to reselect one anyway and + // maybe there is a chance they will reuse the current one } } if (!newWatch_.error.empty()) {