From 3256e02813f81bf5727db470f56a230c6989742e Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Mon, 25 Jun 2018 15:48:57 +0200 Subject: [PATCH] Workaround for Virtua Tennis ball color problem. There's a texture corruption of the tennis ball and other textures, notably the players' bags in the first intro sequence. The corruption is due to render to texture squashing existing textures. Not sure what's going on but this avoids the texture corruption. The original problem remains. --- core/rend/gles/gltex.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/rend/gles/gltex.cpp b/core/rend/gles/gltex.cpp index 2458277a5..878828187 100644 --- a/core/rend/gles/gltex.cpp +++ b/core/rend/gles/gltex.cpp @@ -489,7 +489,7 @@ void ReadRTTBuffer() { glPixelStorei(GL_PACK_ALIGNMENT, 1); u16 *src = temp_tex_buffer; - u16 *dst = (u16 *)&vram[fb_rtt.TexAddr << 3]; + u16 *dst = (u16 *)&vram[tex_addr]; GLint color_fmt, color_type; glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT, &color_fmt); @@ -550,7 +550,7 @@ void ReadRTTBuffer() { } else { - memset(&vram[fb_rtt.TexAddr << 3], '\0', size); + //memset(&vram[fb_rtt.TexAddr << 3], '\0', size); } //dumpRtTexture(fb_rtt.TexAddr, w, h);