From 17b2db7031c102b700052cc869beac2845b2336b Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Wed, 11 Feb 2015 15:32:59 +0600 Subject: [PATCH] Workaround for Mupen64Plus issue with initialization --- FrameBuffer.cpp | 2 -- Textures.cpp | 2 -- VI.cpp | 4 ++++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index 187c41fd..a3138d51 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -496,7 +496,6 @@ void FrameBufferList::renderBuffer(u32 _address) GLint srcCoord[4] = { 0, (GLint)(srcY0*srcScaleY), ogl.getWidth(), (GLint)(srcY1*srcScaleY) }; GLint dstCoord[4] = { hOffset, vOffset + (GLint)(dstY0*dstScaleY), hOffset + ogl.getWidth(), vOffset + (GLint)(dstY1*dstScaleY) }; - assert(!isGLError()); GLenum filter = GL_LINEAR; if (config.video.multisampling != 0) { if (dstPartHeight > 0 || @@ -508,7 +507,6 @@ void FrameBufferList::renderBuffer(u32 _address) } else filter = GL_NEAREST; } - assert(!isGLError()); if (!ogl.isFullscreen()) vOffset += ogl.getHeightOffset(); diff --git a/Textures.cpp b/Textures.cpp index a18e3bf2..7aafc14a 100644 --- a/Textures.cpp +++ b/Textures.cpp @@ -704,7 +704,6 @@ bool TextureCache::_loadHiresBackground(CachedTexture *_pTexture) if (!TFH.isInited()) return false; - isGLError(); // Workaround for Mupen64Plus; u8 * addr = (u8*)(RDRAM + gSP.bgImage.address); int tile_width = gSP.bgImage.width; int tile_height = gSP.bgImage.height; @@ -818,7 +817,6 @@ bool TextureCache::_loadHiresTexture(u32 _tile, CachedTexture *_pTexture) if (config.textureFilter.txHiresEnable == 0 || !TFH.isInited()) return false; - isGLError(); // Workaround for Mupen64Plus; gDPLoadTileInfo & info = gDP.loadInfo[_pTexture->tMem]; int bpl; diff --git a/VI.cpp b/VI.cpp index 91d3cad2..62f20ee1 100644 --- a/VI.cpp +++ b/VI.cpp @@ -82,6 +82,10 @@ void VI_UpdateSize() void VI_UpdateScreen() { static u32 uNumCurFrameIsShown = 0; + + if (VI.lastOrigin == -1) // Workaround for Mupen64Plus issue with initialization + isGLError(); + glFinish(); OGLVideo & ogl = video();