summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/debugger
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-07-23 01:20:57 +0200
committerbunnei <bunneidev@gmail.com>2014-07-23 01:20:57 +0200
commitdaa924b906ff3a6f54d00c5d19874c2f839af0a3 (patch)
tree127b4998ece87140690b7e74853215522d57ecaa /src/citra_qt/debugger
parentMerge pull request #32 from yuriks/master (diff)
parentUse uniform formatting when printing hexadecimal numbers. (diff)
downloadyuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar
yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar.gz
yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar.bz2
yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar.lz
yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar.xz
yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar.zst
yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.zip
Diffstat (limited to 'src/citra_qt/debugger')
-rw-r--r--src/citra_qt/debugger/graphics.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/citra_qt/debugger/graphics.cpp b/src/citra_qt/debugger/graphics.cpp
index 9aaade8f9..0f911a015 100644
--- a/src/citra_qt/debugger/graphics.cpp
+++ b/src/citra_qt/debugger/graphics.cpp
@@ -28,22 +28,24 @@ QVariant GPUCommandStreamItemModel::data(const QModelIndex& index, int role) con
const GSP_GPU::GXCommand& command = GetDebugger()->ReadGXCommandHistory(command_index);
if (role == Qt::DisplayRole)
{
- std::map<GSP_GPU::GXCommandId, const char*> command_names;
- command_names[GSP_GPU::GXCommandId::REQUEST_DMA] = "REQUEST_DMA";
- command_names[GSP_GPU::GXCommandId::SET_COMMAND_LIST_FIRST] = "SET_COMMAND_LIST_FIRST";
- command_names[GSP_GPU::GXCommandId::SET_MEMORY_FILL] = "SET_MEMORY_FILL";
- command_names[GSP_GPU::GXCommandId::SET_DISPLAY_TRANSFER] = "SET_DISPLAY_TRANSFER";
- command_names[GSP_GPU::GXCommandId::SET_TEXTURE_COPY] = "SET_TEXTURE_COPY";
- command_names[GSP_GPU::GXCommandId::SET_COMMAND_LIST_LAST] = "SET_COMMAND_LIST_LAST";
- QString str = QString("%1 %2 %3 %4 %5 %6 %7 %8 %9").arg(command_names[static_cast<GSP_GPU::GXCommandId>(command.id)])
- .arg(command.data[0], 8, 16, QLatin1Char('0'))
- .arg(command.data[1], 8, 16, QLatin1Char('0'))
- .arg(command.data[2], 8, 16, QLatin1Char('0'))
- .arg(command.data[3], 8, 16, QLatin1Char('0'))
- .arg(command.data[4], 8, 16, QLatin1Char('0'))
- .arg(command.data[5], 8, 16, QLatin1Char('0'))
- .arg(command.data[6], 8, 16, QLatin1Char('0'))
- .arg(command.data[7], 8, 16, QLatin1Char('0'));
+ std::map<GSP_GPU::GXCommandId, const char*> command_names = {
+ { GSP_GPU::GXCommandId::REQUEST_DMA, "REQUEST_DMA" },
+ { GSP_GPU::GXCommandId::SET_COMMAND_LIST_FIRST, "SET_COMMAND_LIST_FIRST" },
+ { GSP_GPU::GXCommandId::SET_MEMORY_FILL, "SET_MEMORY_FILL" },
+ { GSP_GPU::GXCommandId::SET_DISPLAY_TRANSFER, "SET_DISPLAY_TRANSFER" },
+ { GSP_GPU::GXCommandId::SET_TEXTURE_COPY, "SET_TEXTURE_COPY" },
+ { GSP_GPU::GXCommandId::SET_COMMAND_LIST_LAST, "SET_COMMAND_LIST_LAST" }
+ };
+ const u32* command_data = reinterpret_cast<const u32*>(&command);
+ QString str = QString("%1 %2 %3 %4 %5 %6 %7 %8 %9").arg(command_names[command.id])
+ .arg(command_data[0], 8, 16, QLatin1Char('0'))
+ .arg(command_data[1], 8, 16, QLatin1Char('0'))
+ .arg(command_data[2], 8, 16, QLatin1Char('0'))
+ .arg(command_data[3], 8, 16, QLatin1Char('0'))
+ .arg(command_data[4], 8, 16, QLatin1Char('0'))
+ .arg(command_data[5], 8, 16, QLatin1Char('0'))
+ .arg(command_data[6], 8, 16, QLatin1Char('0'))
+ .arg(command_data[7], 8, 16, QLatin1Char('0'));
return QVariant(str);
}
else