diff options
| author | 2015-01-01 20:54:45 -0500 | |
|---|---|---|
| committer | 2015-01-01 20:54:45 -0500 | |
| commit | 7c8f6ca0511b35c8a56dce466df01f6364728581 (patch) | |
| tree | bd1fa3b50c090786dd0f91669702ebf010d2a900 /src/core/hw/gpu.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/core/hw/gpu.cpp')
| -rw-r--r-- | src/core/hw/gpu.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index dd619cb16..0ff6c6cde 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp | |||
| @@ -94,11 +94,15 @@ inline void Write(u32 addr, const T data) { | |||
| 94 | int r, g, b, a; | 94 | int r, g, b, a; |
| 95 | } source_color = { 0, 0, 0, 0 }; | 95 | } source_color = { 0, 0, 0, 0 }; |
| 96 | 96 | ||
| 97 | // Cheap emulation of horizontal scaling: Just skip each second pixel of the | ||
| 98 | // input framebuffer. We keep track of this in the pixel_skip variable. | ||
| 99 | unsigned pixel_skip = (config.scale_horizontally != 0) ? 2 : 1; | ||
| 100 | |||
| 97 | switch (config.input_format) { | 101 | switch (config.input_format) { |
| 98 | case Regs::PixelFormat::RGBA8: | 102 | case Regs::PixelFormat::RGBA8: |
| 99 | { | 103 | { |
| 100 | // TODO: Most likely got the component order messed up. | 104 | // TODO: Most likely got the component order messed up. |
| 101 | u8* srcptr = source_pointer + x * 4 + y * config.input_width * 4; | 105 | u8* srcptr = source_pointer + x * 4 * pixel_skip + y * config.input_width * 4 * pixel_skip; |
| 102 | source_color.r = srcptr[0]; // blue | 106 | source_color.r = srcptr[0]; // blue |
| 103 | source_color.g = srcptr[1]; // green | 107 | source_color.g = srcptr[1]; // green |
| 104 | source_color.b = srcptr[2]; // red | 108 | source_color.b = srcptr[2]; // red |