gui/allocations_dialog: Fixed Disassembly could not be opened with the correct address.

This commit is contained in:
nishinji
2025-07-23 23:19:44 +09:00
committed by Zangetsu
parent ea7d05f808
commit 23f07a73bc
3 changed files with 9 additions and 1 deletions
+2 -1
View File
@@ -44,9 +44,10 @@ void draw_allocations_dialog(GuiState &gui, EmuEnvState &emuenv) {
gui.memory_editor_start = generation_num * KiB(4);
gui.memory_editor_count = page.size * KiB(4);
gui.debug_menu.memory_editor_dialog = true;
gui.memory_editor.Open = true;
}
if (ImGui::Selectable("View Disassembly")) {
snprintf(gui.disassembly_address, sizeof(gui.disassembly_address), "%08zx", page.size * KiB(4));
snprintf(gui.disassembly_address, sizeof(gui.disassembly_address), "%08zx", generation_num * KiB(4));
reevaluate_code(gui, emuenv);
gui.debug_menu.disassembly_dialog = true;
}
+3
View File
@@ -74,6 +74,9 @@ static const char *archs[] = {
};
void draw_disassembly_dialog(GuiState &gui, EmuEnvState &emuenv) {
if (!ImGui::IsPopupOpen("Disassembly", ImGuiPopupFlags_AnyPopup)) {
ImGui::SetNextWindowSize(ImVec2(500, 400), ImGuiCond_FirstUseEver);
}
ImGui::Begin("Disassembly", &gui.debug_menu.disassembly_dialog);
ImGui::BeginChild("disasm", ImVec2(0, -(ImGui::GetTextLineHeightWithSpacing() + 10)));
for (const std::string &assembly : gui.disassembly) {
+4
View File
@@ -39,7 +39,11 @@
constexpr uint32_t STANDARD_PAGE_SIZE = KiB(4);
constexpr size_t TOTAL_MEM_SIZE = GiB(4);
constexpr bool LOG_PROTECT = false;
#ifdef NDEBUG
constexpr bool PAGE_NAME_TRACKING = false;
#else
constexpr bool PAGE_NAME_TRACKING = true;
#endif
// TODO: support multiple handlers
static AccessViolationHandler access_violation_handler;