diff options
| author | 2016-12-10 19:33:40 -0500 | |
|---|---|---|
| committer | 2016-12-10 20:01:22 -0500 | |
| commit | f1ee7e4e0e87d743748f9a8d157fc83a8b38cddc (patch) | |
| tree | f659ce8578377ec21c838aeb9539a3502fe530b6 /src/citra_qt/debugger/graphics_cmdlists.cpp | |
| parent | graphics_cmdlists: Make LoadImage internally linked (diff) | |
| download | yuzu-f1ee7e4e0e87d743748f9a8d157fc83a8b38cddc.tar.gz yuzu-f1ee7e4e0e87d743748f9a8d157fc83a8b38cddc.tar.xz yuzu-f1ee7e4e0e87d743748f9a8d157fc83a8b38cddc.zip | |
graphics_cmdlists: Make LoadTexture and TextureInfoWidget src arguments const
Diffstat (limited to 'src/citra_qt/debugger/graphics_cmdlists.cpp')
| -rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index cc49b471a..dde95a219 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #include "video_core/pica_state.h" | 22 | #include "video_core/pica_state.h" |
| 23 | 23 | ||
| 24 | namespace { | 24 | namespace { |
| 25 | QImage LoadTexture(u8* src, const Pica::DebugUtils::TextureInfo& info) { | 25 | QImage LoadTexture(const u8* src, const Pica::DebugUtils::TextureInfo& info) { |
| 26 | QImage decoded_image(info.width, info.height, QImage::Format_ARGB32); | 26 | QImage decoded_image(info.width, info.height, QImage::Format_ARGB32); |
| 27 | for (int y = 0; y < info.height; ++y) { | 27 | for (int y = 0; y < info.height; ++y) { |
| 28 | for (int x = 0; x < info.width; ++x) { | 28 | for (int x = 0; x < info.width; ++x) { |
| @@ -36,7 +36,8 @@ QImage LoadTexture(u8* src, const Pica::DebugUtils::TextureInfo& info) { | |||
| 36 | 36 | ||
| 37 | class TextureInfoWidget : public QWidget { | 37 | class TextureInfoWidget : public QWidget { |
| 38 | public: | 38 | public: |
| 39 | TextureInfoWidget(u8* src, const Pica::DebugUtils::TextureInfo& info, QWidget* parent = nullptr) | 39 | TextureInfoWidget(const u8* src, const Pica::DebugUtils::TextureInfo& info, |
| 40 | QWidget* parent = nullptr) | ||
| 40 | : QWidget(parent) { | 41 | : QWidget(parent) { |
| 41 | QLabel* image_widget = new QLabel; | 42 | QLabel* image_widget = new QLabel; |
| 42 | QPixmap image_pixmap = QPixmap::fromImage(LoadTexture(src, info)); | 43 | QPixmap image_pixmap = QPixmap::fromImage(LoadTexture(src, info)); |
| @@ -162,7 +163,7 @@ void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) { | |||
| 162 | auto format = Pica::g_state.regs.GetTextures()[index].format; | 163 | auto format = Pica::g_state.regs.GetTextures()[index].format; |
| 163 | 164 | ||
| 164 | auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format); | 165 | auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format); |
| 165 | u8* src = Memory::GetPhysicalPointer(config.GetPhysicalAddress()); | 166 | const u8* src = Memory::GetPhysicalPointer(config.GetPhysicalAddress()); |
| 166 | new_info_widget = new TextureInfoWidget(src, info); | 167 | new_info_widget = new TextureInfoWidget(src, info); |
| 167 | } | 168 | } |
| 168 | if (command_info_widget) { | 169 | if (command_info_widget) { |