From 53c1da8f94c70685fd0f50a5b1052a83140e79e1 Mon Sep 17 00:00:00 2001 From: Elad Ashkenazi Date: Mon, 31 Jul 2023 05:21:17 +0300 Subject: [PATCH] Qt: Fix elf_memory_dumping_dialog PPU address --- rpcs3/rpcs3qt/elf_memory_dumping_dialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/rpcs3qt/elf_memory_dumping_dialog.cpp b/rpcs3/rpcs3qt/elf_memory_dumping_dialog.cpp index 0eb7f41844..b96699197a 100644 --- a/rpcs3/rpcs3qt/elf_memory_dumping_dialog.cpp +++ b/rpcs3/rpcs3qt/elf_memory_dumping_dialog.cpp @@ -49,7 +49,7 @@ elf_memory_dumping_dialog::elf_memory_dumping_dialog(u32 ppu_debugger_addr, std: m_ls_address_input = make_hex_edit(5); m_segment_flags_input = make_hex_edit(1); m_segment_flags_input->setText("0x7"); // READ WRITE EXEC - m_ppu_address_input->setText(QStringLiteral("0x%x").arg(ppu_debugger_addr & -0x10000, 2, 16)); // SPU code segments are usually 128 bytes aligned, let's make it even 64k so the user would have to type himself the lower part to avoid human errors. + m_ppu_address_input->setText(QStringLiteral("0x%1").arg(ppu_debugger_addr & -0x10000, 1, 16)); // SPU code segments are usually 128 bytes aligned, let's make it even 64k so the user would have to type himself the lower part to avoid human errors. QPushButton* add_segment_button = new QPushButton(QStringLiteral("+")); add_segment_button->setToolTip(tr("Add new segment")); @@ -170,7 +170,7 @@ void elf_memory_dumping_dialog::add_new_segment() } } - auto item = new QListWidgetItem(tr("PPU Address: 0x%0, LS Address: 0x%1, Segment Size: 0x%2, Flags: 0x%3").arg(+vm::try_get_addr(data.src_addr).first, 2, 16).arg(data.ls_addr, 2, 16).arg(data.segment_size, 2, 16).arg(data.flags, 2, 16), m_seg_list); + auto item = new QListWidgetItem(tr("PPU Address: 0x%0, LS Address: 0x%1, Segment Size: 0x%2, Flags: 0x%3").arg(+vm::try_get_addr(data.src_addr).first, 5, 16).arg(data.ls_addr, 2, 16).arg(data.segment_size, 2, 16).arg(data.flags, 2, 16), m_seg_list); item->setData(Qt::UserRole, QVariant::fromValue(data)); m_seg_list->setCurrentItem(item); }