diff options
| author | 2015-01-01 20:54:45 -0500 | |
|---|---|---|
| committer | 2015-01-01 20:54:45 -0500 | |
| commit | 7c8f6ca0511b35c8a56dce466df01f6364728581 (patch) | |
| tree | bd1fa3b50c090786dd0f91669702ebf010d2a900 /src/citra_qt/debugger/graphics_framebuffer.cpp | |
| parent | Merge pull request #379 from lioncash/sh (diff) | |
| parent | Pica/Rasterizer: Remove some redundant casts. (diff) | |
| download | yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.tar.gz yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.tar.xz yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.zip | |
Merge pull request #358 from neobrain/pica_progress2
pica_progress followups
Diffstat (limited to 'src/citra_qt/debugger/graphics_framebuffer.cpp')
| -rw-r--r-- | src/citra_qt/debugger/graphics_framebuffer.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/citra_qt/debugger/graphics_framebuffer.cpp b/src/citra_qt/debugger/graphics_framebuffer.cpp index dd41c3880..a9e9de652 100644 --- a/src/citra_qt/debugger/graphics_framebuffer.cpp +++ b/src/citra_qt/debugger/graphics_framebuffer.cpp | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <QPushButton> | 10 | #include <QPushButton> |
| 11 | #include <QSpinBox> | 11 | #include <QSpinBox> |
| 12 | 12 | ||
| 13 | #include "video_core/color.h" | ||
| 13 | #include "video_core/pica.h" | 14 | #include "video_core/pica.h" |
| 14 | 15 | ||
| 15 | #include "graphics_framebuffer.hxx" | 16 | #include "graphics_framebuffer.hxx" |
| @@ -202,7 +203,8 @@ void GraphicsFramebufferWidget::OnUpdate() | |||
| 202 | framebuffer_address = framebuffer.GetColorBufferPhysicalAddress(); | 203 | framebuffer_address = framebuffer.GetColorBufferPhysicalAddress(); |
| 203 | framebuffer_width = framebuffer.GetWidth(); | 204 | framebuffer_width = framebuffer.GetWidth(); |
| 204 | framebuffer_height = framebuffer.GetHeight(); | 205 | framebuffer_height = framebuffer.GetHeight(); |
| 205 | framebuffer_format = static_cast<Format>(framebuffer.color_format); | 206 | // TODO: It's unknown how this format is actually specified |
| 207 | framebuffer_format = Format::RGBA8; | ||
| 206 | 208 | ||
| 207 | break; | 209 | break; |
| 208 | } | 210 | } |
| @@ -258,10 +260,10 @@ void GraphicsFramebufferWidget::OnUpdate() | |||
| 258 | for (unsigned y = 0; y < framebuffer_height; ++y) { | 260 | for (unsigned y = 0; y < framebuffer_height; ++y) { |
| 259 | for (unsigned x = 0; x < framebuffer_width; ++x) { | 261 | for (unsigned x = 0; x < framebuffer_width; ++x) { |
| 260 | u16 value = *(u16*)(((u8*)color_buffer) + x * 2 + y * framebuffer_width * 2); | 262 | u16 value = *(u16*)(((u8*)color_buffer) + x * 2 + y * framebuffer_width * 2); |
| 261 | u8 r = (value >> 11) & 0x1F; | 263 | u8 r = Color::Convert5To8((value >> 11) & 0x1F); |
| 262 | u8 g = (value >> 6) & 0x1F; | 264 | u8 g = Color::Convert5To8((value >> 6) & 0x1F); |
| 263 | u8 b = (value >> 1) & 0x1F; | 265 | u8 b = Color::Convert5To8((value >> 1) & 0x1F); |
| 264 | u8 a = value & 1; | 266 | u8 a = Color::Convert1To8(value & 1); |
| 265 | 267 | ||
| 266 | decoded_image.setPixel(x, y, qRgba(r, g, b, 255/*a*/)); | 268 | decoded_image.setPixel(x, y, qRgba(r, g, b, 255/*a*/)); |
| 267 | } | 269 | } |