summaryrefslogtreecommitdiffstats
path: root/src/citra_qt
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-08-25 11:45:29 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-09-07 21:46:31 +0200
commit2bdf9ede9195ab99252094b6a04cab8eebdaafcc (patch)
tree63caeb651379117201522bc84567a396ec99fb59 /src/citra_qt
parentShader Debugger: Remove useless signal (diff)
downloadyuzu-2bdf9ede9195ab99252094b6a04cab8eebdaafcc.tar
yuzu-2bdf9ede9195ab99252094b6a04cab8eebdaafcc.tar.gz
yuzu-2bdf9ede9195ab99252094b6a04cab8eebdaafcc.tar.bz2
yuzu-2bdf9ede9195ab99252094b6a04cab8eebdaafcc.tar.lz
yuzu-2bdf9ede9195ab99252094b6a04cab8eebdaafcc.tar.xz
yuzu-2bdf9ede9195ab99252094b6a04cab8eebdaafcc.tar.zst
yuzu-2bdf9ede9195ab99252094b6a04cab8eebdaafcc.zip
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/debugger/graphics_vertex_shader.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/citra_qt/debugger/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics_vertex_shader.cpp
index 64a3569d4..f01be71cc 100644
--- a/src/citra_qt/debugger/graphics_vertex_shader.cpp
+++ b/src/citra_qt/debugger/graphics_vertex_shader.cpp
@@ -292,12 +292,23 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con
return GetMonospaceFont();
case Qt::BackgroundRole:
- // Highlight instructions which have no debug data associated to them
+ {
+ // Highlight current instruction
+ int current_record_index = par->cycle_index->value();
+ if (current_record_index < par->debug_data.records.size()) {
+ const auto& current_record = par->debug_data.records[current_record_index];
+ if (index.row() == current_record.instruction_offset) {
+ return QColor(255, 255, 63);
+ }
+ }
+
+ // Use a grey background for instructions which have no debug data associated to them
for (const auto& record : par->debug_data.records)
if (index.row() == record.instruction_offset)
return QVariant();
- return QBrush(QColor(255, 255, 127));
+ return QBrush(QColor(192, 192, 192));
+ }
// TODO: Draw arrows for each "reachable" instruction to visualize control flow
@@ -546,8 +557,8 @@ void GraphicsVertexShaderWidget::OnCycleIndexChanged(int index) {
instruction_description->setText(text);
- // Scroll to current instruction
+ // Emit model update notification and scroll to current instruction
QModelIndex instr_index = model->index(record.instruction_offset, 0);
- binary_list->selectionModel()->select(instr_index, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
+ emit model->dataChanged(instr_index, model->index(record.instruction_offset, model->columnCount()));
binary_list->scrollTo(instr_index, QAbstractItemView::EnsureVisible);
}