summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/debugger/graphics_framebuffer.cpp
diff options
context:
space:
mode:
authorTony Wasserka <neobrainx@gmail.com>2015-04-21 21:57:49 +0200
committerTony Wasserka <neobrainx@gmail.com>2015-07-13 23:52:29 +0200
commit88df3fbf275377e6d10cf86aa680ca04e3b5b0d3 (patch)
tree5c0658fce01b9caca2c15b1b25258e21279ff3d1 /src/citra_qt/debugger/graphics_framebuffer.cpp
parentMerge pull request #702 from neobrain/citrace (diff)
downloadyuzu-88df3fbf275377e6d10cf86aa680ca04e3b5b0d3.tar
yuzu-88df3fbf275377e6d10cf86aa680ca04e3b5b0d3.tar.gz
yuzu-88df3fbf275377e6d10cf86aa680ca04e3b5b0d3.tar.bz2
yuzu-88df3fbf275377e6d10cf86aa680ca04e3b5b0d3.tar.lz
yuzu-88df3fbf275377e6d10cf86aa680ca04e3b5b0d3.tar.xz
yuzu-88df3fbf275377e6d10cf86aa680ca04e3b5b0d3.tar.zst
yuzu-88df3fbf275377e6d10cf86aa680ca04e3b5b0d3.zip
Diffstat (limited to 'src/citra_qt/debugger/graphics_framebuffer.cpp')
-rw-r--r--src/citra_qt/debugger/graphics_framebuffer.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/citra_qt/debugger/graphics_framebuffer.cpp b/src/citra_qt/debugger/graphics_framebuffer.cpp
index 6bbe7572c..d9e73a46a 100644
--- a/src/citra_qt/debugger/graphics_framebuffer.cpp
+++ b/src/citra_qt/debugger/graphics_framebuffer.cpp
@@ -184,8 +184,32 @@ void GraphicsFramebufferWidget::OnUpdate()
framebuffer_address = framebuffer.GetColorBufferPhysicalAddress();
framebuffer_width = framebuffer.GetWidth();
framebuffer_height = framebuffer.GetHeight();
- // TODO: It's unknown how this format is actually specified
- framebuffer_format = Format::RGBA8;
+
+ switch (framebuffer.color_format) {
+ case Pica::Regs::ColorFormat::RGBA8:
+ framebuffer_format = Format::RGBA8;
+ break;
+
+ case Pica::Regs::ColorFormat::RGB8:
+ framebuffer_format = Format::RGB8;
+ break;
+
+ case Pica::Regs::ColorFormat::RGB5A1:
+ framebuffer_format = Format::RGB5A1;
+ break;
+
+ case Pica::Regs::ColorFormat::RGB565:
+ framebuffer_format = Format::RGB565;
+ break;
+
+ case Pica::Regs::ColorFormat::RGBA4:
+ framebuffer_format = Format::RGBA4;
+ break;
+
+ default:
+ framebuffer_format = Format::Unknown;
+ break;
+ }
break;
}