summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/debugger
diff options
context:
space:
mode:
authorTony Wasserka <NeoBrainX@gmail.com>2014-05-18 21:18:38 +0200
committerbunnei <ericbunnie@gmail.com>2014-06-12 12:10:53 +0200
commitf82410e6335b02603c7a6fc0fc63894b6a820a5b (patch)
treee703a09ea87cd532ed24bea5067e5c26bcf2ac1a /src/citra_qt/debugger
parentRefine command list debugging functionality and its qt interface. (diff)
downloadyuzu-f82410e6335b02603c7a6fc0fc63894b6a820a5b.tar
yuzu-f82410e6335b02603c7a6fc0fc63894b6a820a5b.tar.gz
yuzu-f82410e6335b02603c7a6fc0fc63894b6a820a5b.tar.bz2
yuzu-f82410e6335b02603c7a6fc0fc63894b6a820a5b.tar.lz
yuzu-f82410e6335b02603c7a6fc0fc63894b6a820a5b.tar.xz
yuzu-f82410e6335b02603c7a6fc0fc63894b6a820a5b.tar.zst
yuzu-f82410e6335b02603c7a6fc0fc63894b6a820a5b.zip
Diffstat (limited to 'src/citra_qt/debugger')
-rw-r--r--src/citra_qt/debugger/graphics_cmdlists.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp
index d07645e78..195197ef5 100644
--- a/src/citra_qt/debugger/graphics_cmdlists.cpp
+++ b/src/citra_qt/debugger/graphics_cmdlists.cpp
@@ -53,7 +53,7 @@ int GPUCommandListModel::rowCount(const QModelIndex& parent) const
int GPUCommandListModel::columnCount(const QModelIndex& parent) const
{
- return 1;
+ return 2;
}
QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const
@@ -68,7 +68,7 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const
const GraphicsDebugger::PicaCommandList& cmdlist = command_lists[item->index].second;
u32 address = command_lists[item->index].first;
- if (role == Qt::DisplayRole)
+ if (role == Qt::DisplayRole && index.column() == 0)
{
return QVariant(QString("0x%1 bytes at 0x%2").arg(cmdlist.size(), 0, 16).arg(address, 8, 16, QLatin1Char('0')));
}
@@ -78,11 +78,17 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const
// index refers to a specific command
const GraphicsDebugger::PicaCommandList& cmdlist = command_lists[item->parent->index].second;
const GraphicsDebugger::PicaCommand& cmd = cmdlist[item->index];
+ const Pica::CommandHeader& header = cmd.GetHeader();
if (role == Qt::DisplayRole) {
QString content;
- for (int j = 0; j < cmd.size(); ++j)
- content.append(QString("%1 ").arg(cmd[j], 8, 16, QLatin1Char('0')));
+ if (index.column() == 0) {
+ content = Pica::command_names[header.cmd_id];
+ content.append(" ");
+ } else if (index.column() == 1) {
+ for (int j = 0; j < cmd.size(); ++j)
+ content.append(QString("%1 ").arg(cmd[j], 8, 16, QLatin1Char('0')));
+ }
return QVariant(content);
}