From 706f9c5574f74b018958477813495dd6e15bd00d Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sun, 26 Oct 2014 11:40:12 +0100 Subject: citra-qt: Polish the pica tracing widget. Changed start/stop button to reflect current tracing status. Properly labeled column headers. --- src/citra_qt/debugger/graphics_cmdlists.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/citra_qt/debugger/graphics_cmdlists.cpp') diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 71dd166cd..9e53a03d0 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp @@ -49,6 +49,24 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const return QVariant(); } +QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + switch(role) { + case Qt::DisplayRole: + { + if (section == 0) { + return tr("Command Name"); + } else if (section == 1) { + return tr("Data"); + } + + break; + } + } + + return QVariant(); +} + void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& trace) { beginResetModel(); @@ -70,7 +88,7 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi list_widget->setFont(QFont("monospace")); list_widget->setRootIsDecorated(false); - QPushButton* toggle_tracing = new QPushButton(tr("Start Tracing")); + toggle_tracing = new QPushButton(tr("Start Tracing")); connect(toggle_tracing, SIGNAL(clicked()), this, SLOT(OnToggleTracing())); connect(this, SIGNAL(TracingFinished(const Pica::DebugUtils::PicaTrace&)), @@ -88,8 +106,10 @@ void GPUCommandListWidget::OnToggleTracing() { if (!Pica::DebugUtils::IsPicaTracing()) { Pica::DebugUtils::StartPicaTracing(); + toggle_tracing->setText(tr("Stop Tracing")); } else { pica_trace = Pica::DebugUtils::FinishPicaTracing(); emit TracingFinished(*pica_trace); + toggle_tracing->setText(tr("Start Tracing")); } } -- cgit v1.2.3 From fd194d95b0f1522b970a2b77f9ea490fb8c3ef08 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sun, 24 Aug 2014 14:39:52 +0200 Subject: citra-qt: Add texture viewer to Pica command list. The texture viewer is enabled when selecting a write command to one of the texture config registers. --- src/citra_qt/debugger/graphics_cmdlists.cpp | 64 ++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) (limited to 'src/citra_qt/debugger/graphics_cmdlists.cpp') diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 9e53a03d0..dcd0ced33 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include #include #include #include @@ -9,6 +10,33 @@ #include "graphics_cmdlists.hxx" +#include "video_core/pica.h" +#include "video_core/math.h" + +#include "video_core/debug_utils/debug_utils.h" + +class TextureInfoWidget : public QWidget { +public: + TextureInfoWidget(u8* src, const Pica::DebugUtils::TextureInfo& info, QWidget* parent = nullptr) : QWidget(parent) { + QImage decoded_image(info.width, info.height, QImage::Format_ARGB32); + for (int y = 0; y < info.height; ++y) { + for (int x = 0; x < info.width; ++x) { + Math::Vec4 color = Pica::DebugUtils::LookupTexture(src, x, y, info); + decoded_image.setPixel(x, y, qRgba(color.r(), color.g(), color.b(), color.a())); + } + } + + QLabel* image_widget = new QLabel; + QPixmap image_pixmap = QPixmap::fromImage(decoded_image); + image_pixmap = image_pixmap.scaled(200, 100, Qt::KeepAspectRatio, Qt::SmoothTransformation); + image_widget->setPixmap(image_pixmap); + + QVBoxLayout* layout = new QVBoxLayout; + layout->addWidget(image_widget); + setLayout(layout); + } +}; + GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(parent) { @@ -44,6 +72,8 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const } return QVariant(content); + } else if (role == CommandIdRole) { + return QVariant::fromValue(cmd.cmd_id.Value()); } return QVariant(); @@ -76,27 +106,59 @@ void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& endResetModel(); } +void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) +{ + QWidget* new_info_widget; + +#define COMMAND_IN_RANGE(cmd_id, reg_name) (cmd_id >= PICA_REG_INDEX(reg_name) && cmd_id < PICA_REG_INDEX(reg_name) + sizeof(decltype(Pica::registers.reg_name)) / 4) + const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt(); + if (COMMAND_IN_RANGE(command_id, texture0)) { + u8* src = Memory::GetPointer(Pica::registers.texture0.GetPhysicalAddress()); + Pica::DebugUtils::TextureInfo info; + info.width = Pica::registers.texture0.width; + info.height = Pica::registers.texture0.height; + info.stride = 3 * Pica::registers.texture0.width; + info.format = Pica::registers.texture0_format; + new_info_widget = new TextureInfoWidget(src, info); + } else { + new_info_widget = new QWidget; + } +#undef COMMAND_IN_RANGE + + widget()->layout()->removeWidget(command_info_widget); + delete command_info_widget; + widget()->layout()->addWidget(new_info_widget); + command_info_widget = new_info_widget; +} GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pica Command List"), parent) { + setObjectName("Pica Command List"); GPUCommandListModel* model = new GPUCommandListModel(this); QWidget* main_widget = new QWidget; - QTreeView* list_widget = new QTreeView; + list_widget = new QTreeView; list_widget->setModel(model); list_widget->setFont(QFont("monospace")); list_widget->setRootIsDecorated(false); + connect(list_widget->selectionModel(), SIGNAL(currentChanged(const QModelIndex&,const QModelIndex&)), + this, SLOT(SetCommandInfo(const QModelIndex&))); + + toggle_tracing = new QPushButton(tr("Start Tracing")); connect(toggle_tracing, SIGNAL(clicked()), this, SLOT(OnToggleTracing())); connect(this, SIGNAL(TracingFinished(const Pica::DebugUtils::PicaTrace&)), model, SLOT(OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace&))); + command_info_widget = new QWidget; + QVBoxLayout* main_layout = new QVBoxLayout; main_layout->addWidget(list_widget); main_layout->addWidget(toggle_tracing); + main_layout->addWidget(command_info_widget); main_widget->setLayout(main_layout); setWidget(main_widget); -- cgit v1.2.3 From 2793619dcef9fb2f97db5f0258ca950e18fe7f13 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sun, 24 Aug 2014 17:23:02 +0200 Subject: citra_qt: Add enhanced texture debugging widgets. Double-clicking a texture parameter command in the pica command lists will spawn these as a new tab in the pica command list dock area. --- src/citra_qt/debugger/graphics_cmdlists.cpp | 173 +++++++++++++++++++++++++--- 1 file changed, 155 insertions(+), 18 deletions(-) (limited to 'src/citra_qt/debugger/graphics_cmdlists.cpp') diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index dcd0ced33..4f58e9a90 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp @@ -4,30 +4,39 @@ #include #include +#include #include #include #include - -#include "graphics_cmdlists.hxx" +#include +#include #include "video_core/pica.h" #include "video_core/math.h" #include "video_core/debug_utils/debug_utils.h" +#include "graphics_cmdlists.hxx" + +#include "util/spinbox.hxx" + +QImage LoadTexture(u8* src, const Pica::DebugUtils::TextureInfo& info) { + QImage decoded_image(info.width, info.height, QImage::Format_ARGB32); + for (int y = 0; y < info.height; ++y) { + for (int x = 0; x < info.width; ++x) { + Math::Vec4 color = Pica::DebugUtils::LookupTexture(src, x, y, info); + decoded_image.setPixel(x, y, qRgba(color.r(), color.g(), color.b(), color.a())); + } + } + + return decoded_image; +} + class TextureInfoWidget : public QWidget { public: TextureInfoWidget(u8* src, const Pica::DebugUtils::TextureInfo& info, QWidget* parent = nullptr) : QWidget(parent) { - QImage decoded_image(info.width, info.height, QImage::Format_ARGB32); - for (int y = 0; y < info.height; ++y) { - for (int x = 0; x < info.width; ++x) { - Math::Vec4 color = Pica::DebugUtils::LookupTexture(src, x, y, info); - decoded_image.setPixel(x, y, qRgba(color.r(), color.g(), color.b(), color.a())); - } - } - QLabel* image_widget = new QLabel; - QPixmap image_pixmap = QPixmap::fromImage(decoded_image); + QPixmap image_pixmap = QPixmap::fromImage(LoadTexture(src, info)); image_pixmap = image_pixmap.scaled(200, 100, Qt::KeepAspectRatio, Qt::SmoothTransformation); image_widget->setPixmap(image_pixmap); @@ -37,6 +46,120 @@ public: } }; +TextureInfoDockWidget::TextureInfoDockWidget(const Pica::DebugUtils::TextureInfo& info, QWidget* parent) + : QDockWidget(tr("Texture 0x%1").arg(info.address, 8, 16, QLatin1Char('0'))), + info(info) { + + QWidget* main_widget = new QWidget; + + QLabel* image_widget = new QLabel; + + connect(this, SIGNAL(UpdatePixmap(const QPixmap&)), image_widget, SLOT(setPixmap(const QPixmap&))); + + CSpinBox* phys_address_spinbox = new CSpinBox; + phys_address_spinbox->SetBase(16); + phys_address_spinbox->SetRange(0, 0xFFFFFFFF); + phys_address_spinbox->SetPrefix("0x"); + phys_address_spinbox->SetValue(info.address); + connect(phys_address_spinbox, SIGNAL(ValueChanged(qint64)), this, SLOT(OnAddressChanged(qint64))); + + QComboBox* format_choice = new QComboBox; + format_choice->addItem(tr("RGBA8")); + format_choice->addItem(tr("RGB8")); + format_choice->addItem(tr("RGBA5551")); + format_choice->addItem(tr("RGB565")); + format_choice->addItem(tr("RGBA4")); + format_choice->setCurrentIndex(static_cast(info.format)); + connect(format_choice, SIGNAL(currentIndexChanged(int)), this, SLOT(OnFormatChanged(int))); + + QSpinBox* width_spinbox = new QSpinBox; + width_spinbox->setMaximum(65535); + width_spinbox->setValue(info.width); + connect(width_spinbox, SIGNAL(valueChanged(int)), this, SLOT(OnWidthChanged(int))); + + QSpinBox* height_spinbox = new QSpinBox; + height_spinbox->setMaximum(65535); + height_spinbox->setValue(info.height); + connect(height_spinbox, SIGNAL(valueChanged(int)), this, SLOT(OnHeightChanged(int))); + + QSpinBox* stride_spinbox = new QSpinBox; + stride_spinbox->setMaximum(65535 * 4); + stride_spinbox->setValue(info.stride); + connect(stride_spinbox, SIGNAL(valueChanged(int)), this, SLOT(OnStrideChanged(int))); + + QVBoxLayout* main_layout = new QVBoxLayout; + main_layout->addWidget(image_widget); + + { + QHBoxLayout* sub_layout = new QHBoxLayout; + sub_layout->addWidget(new QLabel(tr("Source Address:"))); + sub_layout->addWidget(phys_address_spinbox); + main_layout->addLayout(sub_layout); + } + + { + QHBoxLayout* sub_layout = new QHBoxLayout; + sub_layout->addWidget(new QLabel(tr("Format"))); + sub_layout->addWidget(format_choice); + main_layout->addLayout(sub_layout); + } + + { + QHBoxLayout* sub_layout = new QHBoxLayout; + sub_layout->addWidget(new QLabel(tr("Width:"))); + sub_layout->addWidget(width_spinbox); + sub_layout->addStretch(); + sub_layout->addWidget(new QLabel(tr("Height:"))); + sub_layout->addWidget(height_spinbox); + sub_layout->addStretch(); + sub_layout->addWidget(new QLabel(tr("Stride:"))); + sub_layout->addWidget(stride_spinbox); + main_layout->addLayout(sub_layout); + } + + main_widget->setLayout(main_layout); + + emit UpdatePixmap(ReloadPixmap()); + + setWidget(main_widget); +} + +void TextureInfoDockWidget::OnAddressChanged(qint64 value) +{ + info.address = value; + emit UpdatePixmap(ReloadPixmap()); +} + +void TextureInfoDockWidget::OnFormatChanged(int value) +{ + info.format = static_cast(value); + emit UpdatePixmap(ReloadPixmap()); +} + +void TextureInfoDockWidget::OnWidthChanged(int value) +{ + info.width = value; + emit UpdatePixmap(ReloadPixmap()); +} + +void TextureInfoDockWidget::OnHeightChanged(int value) +{ + info.height = value; + emit UpdatePixmap(ReloadPixmap()); +} + +void TextureInfoDockWidget::OnStrideChanged(int value) +{ + info.stride = value; + emit UpdatePixmap(ReloadPixmap()); +} + +QPixmap TextureInfoDockWidget::ReloadPixmap() const +{ + u8* src = Memory::GetPointer(info.address); + return QPixmap::fromImage(LoadTexture(src, info)); +} + GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(parent) { @@ -106,30 +229,42 @@ void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& endResetModel(); } +#define COMMAND_IN_RANGE(cmd_id, reg_name) \ + (cmd_id >= PICA_REG_INDEX(reg_name) && \ + cmd_id < PICA_REG_INDEX(reg_name) + sizeof(decltype(Pica::registers.reg_name)) / 4) + +void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) +{ + + const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt(); + if (COMMAND_IN_RANGE(command_id, texture0)) { + auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(Pica::registers.texture0, + Pica::registers.texture0_format); + QMainWindow* main_window = (QMainWindow*)parent(); + main_window->tabifyDockWidget(this, new TextureInfoDockWidget(info, main_window)); + } +} + void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) { QWidget* new_info_widget; -#define COMMAND_IN_RANGE(cmd_id, reg_name) (cmd_id >= PICA_REG_INDEX(reg_name) && cmd_id < PICA_REG_INDEX(reg_name) + sizeof(decltype(Pica::registers.reg_name)) / 4) const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt(); if (COMMAND_IN_RANGE(command_id, texture0)) { u8* src = Memory::GetPointer(Pica::registers.texture0.GetPhysicalAddress()); - Pica::DebugUtils::TextureInfo info; - info.width = Pica::registers.texture0.width; - info.height = Pica::registers.texture0.height; - info.stride = 3 * Pica::registers.texture0.width; - info.format = Pica::registers.texture0_format; + auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(Pica::registers.texture0, + Pica::registers.texture0_format); new_info_widget = new TextureInfoWidget(src, info); } else { new_info_widget = new QWidget; } -#undef COMMAND_IN_RANGE widget()->layout()->removeWidget(command_info_widget); delete command_info_widget; widget()->layout()->addWidget(new_info_widget); command_info_widget = new_info_widget; } +#undef COMMAND_IN_RANGE GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pica Command List"), parent) { @@ -145,6 +280,8 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi connect(list_widget->selectionModel(), SIGNAL(currentChanged(const QModelIndex&,const QModelIndex&)), this, SLOT(SetCommandInfo(const QModelIndex&))); + connect(list_widget, SIGNAL(doubleClicked(const QModelIndex&)), + this, SLOT(OnCommandDoubleClicked(const QModelIndex&))); toggle_tracing = new QPushButton(tr("Start Tracing")); -- cgit v1.2.3 From 0cd27a511ecd170484b672263c09192b579e31ac Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Thu, 4 Dec 2014 19:41:03 +0100 Subject: Some code cleanup. --- src/citra_qt/debugger/graphics_cmdlists.cpp | 54 ++++++++++------------------- 1 file changed, 19 insertions(+), 35 deletions(-) (limited to 'src/citra_qt/debugger/graphics_cmdlists.cpp') diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 4f58e9a90..ed51f97f3 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp @@ -124,59 +124,49 @@ TextureInfoDockWidget::TextureInfoDockWidget(const Pica::DebugUtils::TextureInfo setWidget(main_widget); } -void TextureInfoDockWidget::OnAddressChanged(qint64 value) -{ +void TextureInfoDockWidget::OnAddressChanged(qint64 value) { info.address = value; emit UpdatePixmap(ReloadPixmap()); } -void TextureInfoDockWidget::OnFormatChanged(int value) -{ +void TextureInfoDockWidget::OnFormatChanged(int value) { info.format = static_cast(value); emit UpdatePixmap(ReloadPixmap()); } -void TextureInfoDockWidget::OnWidthChanged(int value) -{ +void TextureInfoDockWidget::OnWidthChanged(int value) { info.width = value; emit UpdatePixmap(ReloadPixmap()); } -void TextureInfoDockWidget::OnHeightChanged(int value) -{ +void TextureInfoDockWidget::OnHeightChanged(int value) { info.height = value; emit UpdatePixmap(ReloadPixmap()); } -void TextureInfoDockWidget::OnStrideChanged(int value) -{ +void TextureInfoDockWidget::OnStrideChanged(int value) { info.stride = value; emit UpdatePixmap(ReloadPixmap()); } -QPixmap TextureInfoDockWidget::ReloadPixmap() const -{ +QPixmap TextureInfoDockWidget::ReloadPixmap() const { u8* src = Memory::GetPointer(info.address); return QPixmap::fromImage(LoadTexture(src, info)); } -GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(parent) -{ +GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(parent) { } -int GPUCommandListModel::rowCount(const QModelIndex& parent) const -{ +int GPUCommandListModel::rowCount(const QModelIndex& parent) const { return pica_trace.writes.size(); } -int GPUCommandListModel::columnCount(const QModelIndex& parent) const -{ +int GPUCommandListModel::columnCount(const QModelIndex& parent) const { return 2; } -QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const -{ +QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const { if (!index.isValid()) return QVariant(); @@ -202,8 +192,7 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const return QVariant(); } -QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientation, int role) const -{ +QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientation, int role) const { switch(role) { case Qt::DisplayRole: { @@ -220,8 +209,7 @@ QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientatio return QVariant(); } -void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& trace) -{ +void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& trace) { beginResetModel(); pica_trace = trace; @@ -233,20 +221,19 @@ void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& (cmd_id >= PICA_REG_INDEX(reg_name) && \ cmd_id < PICA_REG_INDEX(reg_name) + sizeof(decltype(Pica::registers.reg_name)) / 4) -void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) -{ - +void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) { const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt(); if (COMMAND_IN_RANGE(command_id, texture0)) { auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(Pica::registers.texture0, Pica::registers.texture0_format); - QMainWindow* main_window = (QMainWindow*)parent(); + + // TODO: Instead, emit a signal here to be caught by the main window widget. + auto main_window = static_cast(parent()); main_window->tabifyDockWidget(this, new TextureInfoDockWidget(info, main_window)); } } -void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) -{ +void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) { QWidget* new_info_widget; const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt(); @@ -266,8 +253,7 @@ void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) } #undef COMMAND_IN_RANGE -GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pica Command List"), parent) -{ +GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pica Command List"), parent) { setObjectName("Pica Command List"); GPUCommandListModel* model = new GPUCommandListModel(this); @@ -283,7 +269,6 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi connect(list_widget, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(OnCommandDoubleClicked(const QModelIndex&))); - toggle_tracing = new QPushButton(tr("Start Tracing")); connect(toggle_tracing, SIGNAL(clicked()), this, SLOT(OnToggleTracing())); @@ -301,8 +286,7 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi setWidget(main_widget); } -void GPUCommandListWidget::OnToggleTracing() -{ +void GPUCommandListWidget::OnToggleTracing() { if (!Pica::DebugUtils::IsPicaTracing()) { Pica::DebugUtils::StartPicaTracing(); toggle_tracing->setText(tr("Stop Tracing")); -- cgit v1.2.3 From ac4d7462cb9de2038ba466f03a0241fde28ed73f Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Thu, 4 Dec 2014 20:41:45 +0100 Subject: citra-qt: Rename "Stop Tracing" to "Finish Tracing". This better reflects that no commands are supposed to show up until you hit the button a second time. --- src/citra_qt/debugger/graphics_cmdlists.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/citra_qt/debugger/graphics_cmdlists.cpp') diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index ed51f97f3..b2b8df101 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp @@ -289,7 +289,7 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi void GPUCommandListWidget::OnToggleTracing() { if (!Pica::DebugUtils::IsPicaTracing()) { Pica::DebugUtils::StartPicaTracing(); - toggle_tracing->setText(tr("Stop Tracing")); + toggle_tracing->setText(tr("Finish Tracing")); } else { pica_trace = Pica::DebugUtils::FinishPicaTracing(); emit TracingFinished(*pica_trace); -- cgit v1.2.3 From 8b8131baecca16b46c22318b3331b2165cc74cbc Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Thu, 4 Dec 2014 21:00:06 +0100 Subject: More cleanups. --- src/citra_qt/debugger/graphics_cmdlists.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/citra_qt/debugger/graphics_cmdlists.cpp') diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index b2b8df101..7f97cf143 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp @@ -177,14 +177,14 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const { if (role == Qt::DisplayRole) { QString content; if (index.column() == 0) { - content = QString::fromLatin1(Pica::Regs::GetCommandName(cmd.cmd_id).c_str()); + QString content = QString::fromLatin1(Pica::Regs::GetCommandName(cmd.cmd_id).c_str()); content.append(" "); + return content; } else if (index.column() == 1) { - content.append(QString("%1 ").arg(cmd.hex, 8, 16, QLatin1Char('0'))); + QString content = QString("%1 ").arg(cmd.hex, 8, 16, QLatin1Char('0')); content.append(QString("%1 ").arg(val, 8, 16, QLatin1Char('0'))); + return content; } - - return QVariant(content); } else if (role == CommandIdRole) { return QVariant::fromValue(cmd.cmd_id.Value()); } -- cgit v1.2.3