From a7657c5a706cc062c05264aae607603b40eaed7b Mon Sep 17 00:00:00 2001 From: oioitff Date: Sun, 2 Jun 2013 01:28:23 +0800 Subject: [PATCH] Fix a tiny bug in Framebuffer. Prepare for showing video images. --- GPU/GLES/Framebuffer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 10e5e12c09..34a2701d1f 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -189,9 +189,9 @@ void FramebufferManager::DrawPixels(const u8 *framebuf, int pixelFormat, int lin for (int x = 0; x < 480; x++) { dst[x * 4] = src[x * 4]; - dst[x * 4 + 1] = src[x * 4 + 3]; + dst[x * 4 + 1] = src[x * 4 + 1]; dst[x * 4 + 2] = src[x * 4 + 2]; - dst[x * 4 + 3] = src[x * 4 + 1]; + dst[x * 4 + 3] = src[x * 4 + 3]; } } break; @@ -214,6 +214,10 @@ void FramebufferManager::DrawPixels(const u8 *framebuf, int pixelFormat, int lin } glBindTexture(GL_TEXTURE_2D,backbufTex); + if (g_Config.bLinearFiltering) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + } glTexSubImage2D(GL_TEXTURE_2D,0,0,0,480,272, GL_RGBA, GL_UNSIGNED_BYTE, convBuf); float x, y, w, h;