1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Qt: Fix elf_memory_dumping_dialog PPU address

This commit is contained in:
Elad Ashkenazi 2023-07-31 05:21:17 +03:00
parent 213b810279
commit 53c1da8f94

View File

@ -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);
}