diff options
author | Tony Wasserka <NeoBrainX@gmail.com> | 2014-12-04 21:00:06 +0100 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2014-12-09 16:37:34 +0100 |
commit | 8b8131baecca16b46c22318b3331b2165cc74cbc (patch) | |
tree | 816d9a88deded411908e6d9aa22a648416c41469 /src/citra_qt/debugger | |
parent | Pica: Re-enable command names on MSVC. (diff) | |
download | yuzu-8b8131baecca16b46c22318b3331b2165cc74cbc.tar yuzu-8b8131baecca16b46c22318b3331b2165cc74cbc.tar.gz yuzu-8b8131baecca16b46c22318b3331b2165cc74cbc.tar.bz2 yuzu-8b8131baecca16b46c22318b3331b2165cc74cbc.tar.lz yuzu-8b8131baecca16b46c22318b3331b2165cc74cbc.tar.xz yuzu-8b8131baecca16b46c22318b3331b2165cc74cbc.tar.zst yuzu-8b8131baecca16b46c22318b3331b2165cc74cbc.zip |
Diffstat (limited to 'src/citra_qt/debugger')
-rw-r--r-- | src/citra_qt/debugger/graphics_breakpoints.cpp | 11 | ||||
-rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.cpp | 8 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/citra_qt/debugger/graphics_breakpoints.cpp b/src/citra_qt/debugger/graphics_breakpoints.cpp index 5973aafc8..df5579e15 100644 --- a/src/citra_qt/debugger/graphics_breakpoints.cpp +++ b/src/citra_qt/debugger/graphics_breakpoints.cpp @@ -36,7 +36,9 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const switch (role) { case Qt::DisplayRole: { - if (index.column() == 0) { + switch (index.column()) { + case 0: + { std::map<Pica::DebugContext::Event, QString> map; map.insert({Pica::DebugContext::Event::CommandLoaded, tr("Pica command loaded")}); map.insert({Pica::DebugContext::Event::CommandProcessed, tr("Pica command processed")}); @@ -46,8 +48,13 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const _dbg_assert_(GUI, map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents)); return map[event]; - } else if (index.column() == 1) { + } + + case 1: return data(index, Role_IsEnabled).toBool() ? tr("Enabled") : tr("Disabled"); + + default: + break; } break; 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<int>(cmd.cmd_id.Value()); } |