aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Lectem <lectem@gmail.com>2015-07-25 14:22:09 +0200
committerGravatar Lectem <lectem@gmail.com>2015-07-25 22:13:04 +0200
commit129e3dedc32c5593d37a23f4eb1066fab7916d85 (patch)
treea9e6f3a876a80c3528d7c76d55308965b33c7573 /src
parent24d7c05c8dd96a447699ba5059410d2009fab5c8 (diff)
citra-qt/command list: Split register and value columns.
Also removed the extra spaces for each cell
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/debugger/graphics_cmdlists.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp
index de10bce1..425e127e 100644
--- a/src/citra_qt/debugger/graphics_cmdlists.cpp
+++ b/src/citra_qt/debugger/graphics_cmdlists.cpp
@@ -174,7 +174,7 @@ int GPUCommandListModel::rowCount(const QModelIndex& parent) const {
}
int GPUCommandListModel::columnCount(const QModelIndex& parent) const {
- return 2;
+ return 3;
}
QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const {
@@ -187,14 +187,13 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const {
if (role == Qt::DisplayRole) {
QString content;
- if (index.column() == 0) {
- QString content = QString::fromLatin1(Pica::Regs::GetCommandName(cmd.cmd_id).c_str());
- content.append(" ");
- return content;
- } else if (index.column() == 1) {
- QString content = QString("%1 ").arg(cmd.hex, 8, 16, QLatin1Char('0'));
- content.append(QString("%1 ").arg(val, 8, 16, QLatin1Char('0')));
- return content;
+ switch ( index.column() ) {
+ case 0:
+ return QString::fromLatin1(Pica::Regs::GetCommandName(cmd.cmd_id).c_str());
+ case 1:
+ return QString("%1").arg(cmd.cmd_id, 3, 16, QLatin1Char('0'));
+ case 2:
+ return QString("%1").arg(val, 8, 16, QLatin1Char('0'));
}
} else if (role == CommandIdRole) {
return QVariant::fromValue<int>(cmd.cmd_id.Value());
@@ -207,10 +206,13 @@ QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientatio
switch(role) {
case Qt::DisplayRole:
{
- if (section == 0) {
+ switch (section) {
+ case 0:
return tr("Command Name");
- } else if (section == 1) {
- return tr("Data");
+ case 1:
+ return tr("Register");
+ case 2:
+ return tr("New Value");
}
break;