From 4499a6f966aeee789482bdff6a8a6bbc3851c54c Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Thu, 25 Sep 2014 22:57:50 +0700 Subject: [PATCH] Fix *BufferToRDRAM destroy(). Fixed run 4mb games after 8mb ones. --- FrameBuffer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index 06aeb7de..9c7395b3 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -70,9 +70,9 @@ public: private: GLuint m_FBO; CachedTexture * m_pTexture; - GLuint m_aPBO[2]; u32 m_aAddress[2]; u32 m_curIndex; + GLuint m_aPBO[2]; }; #endif // GLES2 @@ -531,6 +531,8 @@ void FrameBufferToRDRAM::Destroy() { } glDeleteBuffers(2, m_aPBO); m_aPBO[0] = m_aPBO[1] = 0; + m_curIndex = 0; + m_aAddress[0] = m_aAddress[1] = 0; } void FrameBufferToRDRAM::CopyToRDRAM( u32 address, bool bSync ) { @@ -667,6 +669,8 @@ void DepthBufferToRDRAM::Destroy() { } glDeleteBuffers(2, m_aPBO); m_aPBO[0] = m_aPBO[1] = 0; + m_curIndex = 0; + m_aAddress[0] = m_aAddress[1] = 0; } void DepthBufferToRDRAM::CopyToRDRAM( u32 address) {