From b1284222f212a663754d846d3ae13529617c1501 Mon Sep 17 00:00:00 2001
From: Subv <subv2112@gmail.com>
Date: Sun, 22 Feb 2015 15:22:14 -0500
Subject: [PATCH] GPU: Fixed RGBA8 as output format in a display transfer.

Verified with hwtests
---
 src/core/hw/gpu.cpp | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 8800235294..e6022d69fb 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -167,16 +167,15 @@ inline void Write(u32 addr, const T data) {
                     }
 
                     switch (config.output_format) {
-                    /*case Regs::PixelFormat::RGBA8:
+                    case Regs::PixelFormat::RGBA8:
                     {
-                        // TODO: Untested
-                        u8* dstptr = (u32*)(dest_pointer + x * 4 + y * config.output_width * 4);
-                        dstptr[0] = source_color.r;
-                        dstptr[1] = source_color.g;
-                        dstptr[2] = source_color.b;
-                        dstptr[3] = source_color.a;
+                        u8* dstptr = dest_pointer + (x * pixel_skip + y * config.output_width) * 4;
+                        dstptr[3] = source_color.r;
+                        dstptr[2] = source_color.g;
+                        dstptr[1] = source_color.b;
+                        dstptr[0] = source_color.a;
                         break;
-                    }*/
+                    }
 
                     case Regs::PixelFormat::RGB8:
                     {