From ad0b8435ca266943c6f6ed3c3d4c9893c89bb28d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 3 Jun 2018 07:45:48 -0700 Subject: [PATCH] D3D9: Reuse BGRA conversion code. Also, couldn't have been right to skip it when the pointers equal, not sure if that case was ever being hit. --- GPU/Directx9/FramebufferDX9.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/GPU/Directx9/FramebufferDX9.cpp b/GPU/Directx9/FramebufferDX9.cpp index 9047dae2fb..8b6025732a 100644 --- a/GPU/Directx9/FramebufferDX9.cpp +++ b/GPU/Directx9/FramebufferDX9.cpp @@ -529,16 +529,7 @@ static const D3DVERTEXELEMENT9 g_FramebufferVertexElements[] = { const u32 *src32 = (const u32 *)src; if (format == GE_FORMAT_8888) { - u32 *dst32 = (u32 *)dst; - if (src == dst) { - return; - } else { - for (u32 y = 0; y < height; ++y) { - ConvertBGRA8888ToRGBA8888(dst32, src32, width); - src32 += srcStride; - dst32 += dstStride; - } - } + ConvertFromBGRA8888(dst, src, dstStride, srcStride, width, height, Draw::DataFormat::R8G8B8A8_UNORM); } else { // But here it shouldn't matter if they do intersect u16 *dst16 = (u16 *)dst;