Skip to content

Commit

Permalink
rsx_debugger: clear command count when not used
Browse files Browse the repository at this point in the history
  • Loading branch information
Megamouse authored and Nekotekina committed Mar 31, 2018
1 parent c42b25f commit 2bf405e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions rpcs3/rpcs3qt/rsx_debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,6 @@ void rsx_debugger::GetMemory()
{
int item_count = m_list_commands->rowCount();

// Clean commands column
for(u32 i=0; i < item_count; i++)
m_list_commands->setItem(i, 2, new QTableWidgetItem(""));

// Write information
for(u32 i=0, addr = m_addr; i < item_count; i++, addr += 4)
{
Expand All @@ -633,8 +629,8 @@ void rsx_debugger::GetMemory()
u32 cmd = vm::read32(addr);
u32 count = (cmd >> 18) & 0x7ff;
m_list_commands->setItem(i, 1, new QTableWidgetItem(qstr(fmt::format("%08x", cmd))));
m_list_commands->setItem(i, 3, new QTableWidgetItem(qstr(fmt::format("%d", count))));
m_list_commands->setItem(i, 2, new QTableWidgetItem(DisAsmCommand(cmd, count, addr, 0)));
m_list_commands->setItem(i, 3, new QTableWidgetItem(QString::number(count)));

if((cmd & RSX_METHOD_OLD_JUMP_CMD_MASK) != RSX_METHOD_OLD_JUMP_CMD
&& (cmd & RSX_METHOD_NEW_JUMP_CMD_MASK) != RSX_METHOD_NEW_JUMP_CMD
Expand All @@ -647,6 +643,8 @@ void rsx_debugger::GetMemory()
else
{
m_list_commands->setItem(i, 1, new QTableWidgetItem("????????"));
m_list_commands->setItem(i, 2, new QTableWidgetItem(""));
m_list_commands->setItem(i, 3, new QTableWidgetItem(""));
}
}

Expand Down

0 comments on commit 2bf405e

Please sign in to comment.