summaryrefslogtreecommitdiffstats
path: root/src/core/hw
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-08-27 00:10:23 +0200
committerbunnei <bunneidev@gmail.com>2014-08-27 00:10:23 +0200
commit1a7bbe2569b95a19926349d0975894f8fa873cab (patch)
tree9b90eb8eda2a89eeb7302d9fa5af79a466cd695b /src/core/hw
parentMerge pull request #74 from kevinhartman/master (diff)
parentVideoCore: Fixes rendering issues on Qt and corrects framebuffer output size. (diff)
downloadyuzu-1a7bbe2569b95a19926349d0975894f8fa873cab.tar
yuzu-1a7bbe2569b95a19926349d0975894f8fa873cab.tar.gz
yuzu-1a7bbe2569b95a19926349d0975894f8fa873cab.tar.bz2
yuzu-1a7bbe2569b95a19926349d0975894f8fa873cab.tar.lz
yuzu-1a7bbe2569b95a19926349d0975894f8fa873cab.tar.xz
yuzu-1a7bbe2569b95a19926349d0975894f8fa873cab.tar.zst
yuzu-1a7bbe2569b95a19926349d0975894f8fa873cab.zip
Diffstat (limited to 'src/core/hw')
-rw-r--r--src/core/hw/gpu.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 87cf93bac..f1f3e7ab3 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -84,7 +84,7 @@ inline void Write(u32 addr, const T data) {
for (int y = 0; y < config.output_height; ++y) {
// TODO: Why does the register seem to hold twice the framebuffer width?
- for (int x = 0; x < config.output_width / 2; ++x) {
+ for (int x = 0; x < config.output_width; ++x) {
struct {
int r, g, b, a;
} source_color = { 0, 0, 0, 0 };
@@ -93,7 +93,7 @@ inline void Write(u32 addr, const T data) {
case Regs::FramebufferFormat::RGBA8:
{
// TODO: Most likely got the component order messed up.
- u8* srcptr = source_pointer + x * 4 + y * config.input_width * 4 / 2;
+ u8* srcptr = source_pointer + x * 4 + y * config.input_width * 4;
source_color.r = srcptr[0]; // blue
source_color.g = srcptr[1]; // green
source_color.b = srcptr[2]; // red
@@ -121,7 +121,7 @@ inline void Write(u32 addr, const T data) {
case Regs::FramebufferFormat::RGB8:
{
// TODO: Most likely got the component order messed up.
- u8* dstptr = dest_pointer + x * 3 + y * config.output_width * 3 / 2;
+ u8* dstptr = dest_pointer + x * 3 + y * config.output_width * 3;
dstptr[0] = source_color.r; // blue
dstptr[1] = source_color.g; // green
dstptr[2] = source_color.b; // red
@@ -217,16 +217,15 @@ void Init() {
framebuffer_sub.address_right1 = 0x184C7800;
//framebuffer_sub.address_right2 = unknown;
- // TODO: Width should be 240 instead?
- framebuffer_top.width = 480;
+ framebuffer_top.width = 240;
framebuffer_top.height = 400;
- framebuffer_top.stride = 480*3;
+ framebuffer_top.stride = 3 * 240;
framebuffer_top.color_format = Regs::FramebufferFormat::RGB8;
framebuffer_top.active_fb = 0;
- framebuffer_sub.width = 480;
- framebuffer_sub.height = 400;
- framebuffer_sub.stride = 480*3;
+ framebuffer_sub.width = 240;
+ framebuffer_sub.height = 320;
+ framebuffer_sub.stride = 3 * 240;
framebuffer_sub.color_format = Regs::FramebufferFormat::RGB8;
framebuffer_sub.active_fb = 0;