summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2016-12-11 01:44:01 +0100
committerLioncash <mathew1800@gmail.com>2016-12-11 10:33:24 +0100
commit4e7092881f6655b5ae99db2f0a1e8136199804d0 (patch)
tree626b3fa72785b1896606a142f9139d25acacc7ae /src
parentgraphics_cmdlists: Get rid of an unused variable (diff)
downloadyuzu-4e7092881f6655b5ae99db2f0a1e8136199804d0.tar
yuzu-4e7092881f6655b5ae99db2f0a1e8136199804d0.tar.gz
yuzu-4e7092881f6655b5ae99db2f0a1e8136199804d0.tar.bz2
yuzu-4e7092881f6655b5ae99db2f0a1e8136199804d0.tar.lz
yuzu-4e7092881f6655b5ae99db2f0a1e8136199804d0.tar.xz
yuzu-4e7092881f6655b5ae99db2f0a1e8136199804d0.tar.zst
yuzu-4e7092881f6655b5ae99db2f0a1e8136199804d0.zip
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/debugger/graphics_cmdlists.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp
index 6958ac347..98b619dea 100644
--- a/src/citra_qt/debugger/graphics_cmdlists.cpp
+++ b/src/citra_qt/debugger/graphics_cmdlists.cpp
@@ -124,19 +124,21 @@ void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) {
if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) ||
COMMAND_IN_RANGE(command_id, texture2)) {
- unsigned index;
+ unsigned texture_index;
if (COMMAND_IN_RANGE(command_id, texture0)) {
- index = 0;
+ texture_index = 0;
} else if (COMMAND_IN_RANGE(command_id, texture1)) {
- index = 1;
+ texture_index = 1;
} else if (COMMAND_IN_RANGE(command_id, texture2)) {
- index = 2;
+ texture_index = 2;
} else {
UNREACHABLE_MSG("Unknown texture command");
}
- auto config = Pica::g_state.regs.GetTextures()[index].config;
- auto format = Pica::g_state.regs.GetTextures()[index].format;
- auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
+
+ const auto texture = Pica::g_state.regs.GetTextures()[texture_index];
+ const auto config = texture.config;
+ const auto format = texture.format;
+ const auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
// TODO: Open a surface debugger
}
@@ -150,18 +152,20 @@ void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) {
if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) ||
COMMAND_IN_RANGE(command_id, texture2)) {
- unsigned index;
+ unsigned texture_index;
if (COMMAND_IN_RANGE(command_id, texture0)) {
- index = 0;
+ texture_index = 0;
} else if (COMMAND_IN_RANGE(command_id, texture1)) {
- index = 1;
+ texture_index = 1;
} else {
- index = 2;
+ texture_index = 2;
}
- auto config = Pica::g_state.regs.GetTextures()[index].config;
- auto format = Pica::g_state.regs.GetTextures()[index].format;
- auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
+ const auto texture = Pica::g_state.regs.GetTextures()[texture_index];
+ const auto config = texture.config;
+ const auto format = texture.format;
+
+ const auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
const u8* src = Memory::GetPhysicalPointer(config.GetPhysicalAddress());
new_info_widget = new TextureInfoWidget(src, info);
}