diff options
| author | 2015-08-19 05:51:12 -0300 | |
|---|---|---|
| committer | 2015-09-07 16:46:29 -0300 | |
| commit | c1beb2ce2041c078674fb0cacafbccb4196cc3bc (patch) | |
| tree | 89882ff65b6b7d465852e34d2c5673cfd16a9b1f /src | |
| parent | Shader Debugger: Improve space efficiency of the layout (diff) | |
| download | yuzu-c1beb2ce2041c078674fb0cacafbccb4196cc3bc.tar.gz yuzu-c1beb2ce2041c078674fb0cacafbccb4196cc3bc.tar.xz yuzu-c1beb2ce2041c078674fb0cacafbccb4196cc3bc.zip | |
Shader Debugger: Fix freeze when double-clicking shader disassembly
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.cpp | 2 | ||||
| -rw-r--r-- | src/citra_qt/debugger/graphics_vertex_shader.cpp | 10 | ||||
| -rw-r--r-- | src/citra_qt/debugger/graphics_vertex_shader.h | 6 |
3 files changed, 4 insertions, 14 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 025434687..fa32d24b5 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp | |||
| @@ -359,7 +359,7 @@ void GPUCommandListWidget::CopyAllToClipboard() { | |||
| 359 | QClipboard* clipboard = QApplication::clipboard(); | 359 | QClipboard* clipboard = QApplication::clipboard(); |
| 360 | QString text; | 360 | QString text; |
| 361 | 361 | ||
| 362 | QAbstractItemModel* model = static_cast<QAbstractListModel*>(list_widget->model()); | 362 | QAbstractItemModel* model = static_cast<QAbstractItemModel*>(list_widget->model()); |
| 363 | 363 | ||
| 364 | for (int row = 0; row < model->rowCount({}); ++row) { | 364 | for (int row = 0; row < model->rowCount({}); ++row) { |
| 365 | for (int col = 0; col < model->columnCount({}); ++col) { | 365 | for (int col = 0; col < model->columnCount({}); ++col) { |
diff --git a/src/citra_qt/debugger/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics_vertex_shader.cpp index 32c48cb6e..a94538874 100644 --- a/src/citra_qt/debugger/graphics_vertex_shader.cpp +++ b/src/citra_qt/debugger/graphics_vertex_shader.cpp | |||
| @@ -27,18 +27,10 @@ using nihstro::Instruction; | |||
| 27 | using nihstro::SourceRegister; | 27 | using nihstro::SourceRegister; |
| 28 | using nihstro::SwizzlePattern; | 28 | using nihstro::SwizzlePattern; |
| 29 | 29 | ||
| 30 | GraphicsVertexShaderModel::GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent): QAbstractItemModel(parent), par(parent) { | 30 | GraphicsVertexShaderModel::GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent): QAbstractTableModel(parent), par(parent) { |
| 31 | 31 | ||
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | QModelIndex GraphicsVertexShaderModel::index(int row, int column, const QModelIndex& parent) const { | ||
| 35 | return createIndex(row, column); | ||
| 36 | } | ||
| 37 | |||
| 38 | QModelIndex GraphicsVertexShaderModel::parent(const QModelIndex& child) const { | ||
| 39 | return QModelIndex(); | ||
| 40 | } | ||
| 41 | |||
| 42 | int GraphicsVertexShaderModel::columnCount(const QModelIndex& parent) const { | 34 | int GraphicsVertexShaderModel::columnCount(const QModelIndex& parent) const { |
| 43 | return 3; | 35 | return 3; |
| 44 | } | 36 | } |
diff --git a/src/citra_qt/debugger/graphics_vertex_shader.h b/src/citra_qt/debugger/graphics_vertex_shader.h index 1b3f1f7ec..d4e93103f 100644 --- a/src/citra_qt/debugger/graphics_vertex_shader.h +++ b/src/citra_qt/debugger/graphics_vertex_shader.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <QAbstractListModel> | 7 | #include <QAbstractTableModel> |
| 8 | 8 | ||
| 9 | #include "graphics_breakpoint_observer.h" | 9 | #include "graphics_breakpoint_observer.h" |
| 10 | 10 | ||
| @@ -17,14 +17,12 @@ class QSpinBox; | |||
| 17 | 17 | ||
| 18 | class GraphicsVertexShaderWidget; | 18 | class GraphicsVertexShaderWidget; |
| 19 | 19 | ||
| 20 | class GraphicsVertexShaderModel : public QAbstractItemModel { | 20 | class GraphicsVertexShaderModel : public QAbstractTableModel { |
| 21 | Q_OBJECT | 21 | Q_OBJECT |
| 22 | 22 | ||
| 23 | public: | 23 | public: |
| 24 | GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent); | 24 | GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent); |
| 25 | 25 | ||
| 26 | QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override; | ||
| 27 | QModelIndex parent(const QModelIndex& child) const override; | ||
| 28 | int columnCount(const QModelIndex& parent = QModelIndex()) const override; | 26 | int columnCount(const QModelIndex& parent = QModelIndex()) const override; |
| 29 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; | 27 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; |
| 30 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; | 28 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; |