summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/debugger/graphics_framebuffer.cpp28
-rw-r--r--src/citra_qt/debugger/graphics_framebuffer.h3
2 files changed, 28 insertions, 3 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()
184 framebuffer_address = framebuffer.GetColorBufferPhysicalAddress(); 184 framebuffer_address = framebuffer.GetColorBufferPhysicalAddress();
185 framebuffer_width = framebuffer.GetWidth(); 185 framebuffer_width = framebuffer.GetWidth();
186 framebuffer_height = framebuffer.GetHeight(); 186 framebuffer_height = framebuffer.GetHeight();
187 // TODO: It's unknown how this format is actually specified 187
188 framebuffer_format = Format::RGBA8; 188 switch (framebuffer.color_format) {
189 case Pica::Regs::ColorFormat::RGBA8:
190 framebuffer_format = Format::RGBA8;
191 break;
192
193 case Pica::Regs::ColorFormat::RGB8:
194 framebuffer_format = Format::RGB8;
195 break;
196
197 case Pica::Regs::ColorFormat::RGB5A1:
198 framebuffer_format = Format::RGB5A1;
199 break;
200
201 case Pica::Regs::ColorFormat::RGB565:
202 framebuffer_format = Format::RGB565;
203 break;
204
205 case Pica::Regs::ColorFormat::RGBA4:
206 framebuffer_format = Format::RGBA4;
207 break;
208
209 default:
210 framebuffer_format = Format::Unknown;
211 break;
212 }
189 213
190 break; 214 break;
191 } 215 }
diff --git a/src/citra_qt/debugger/graphics_framebuffer.h b/src/citra_qt/debugger/graphics_framebuffer.h
index 4cb396ffe..267c81983 100644
--- a/src/citra_qt/debugger/graphics_framebuffer.h
+++ b/src/citra_qt/debugger/graphics_framebuffer.h
@@ -35,7 +35,8 @@ class GraphicsFramebufferWidget : public BreakPointObserverDock {
35 RGBA4 = 4, 35 RGBA4 = 4,
36 D16 = 5, 36 D16 = 5,
37 D24 = 6, 37 D24 = 6,
38 D24S8 = 7 38 D24S8 = 7,
39 Unknown = 8
39 }; 40 };
40 41
41 static u32 BytesPerPixel(Format format); 42 static u32 BytesPerPixel(Format format);