From bee66bdb4d6c2cc0e9a34590d33884963e081cab Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 14 Jul 2013 02:56:48 +0800 Subject: [PATCH] Fix depth issues in multiple games --- GPU/GLES/StateMapping.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GLES/StateMapping.cpp b/GPU/GLES/StateMapping.cpp index 84cec4b44..561ad2668 100644 --- a/GPU/GLES/StateMapping.cpp +++ b/GPU/GLES/StateMapping.cpp @@ -221,7 +221,7 @@ void TransformDrawEngine::ApplyDrawState(int prim) { if (gstate.isDepthTestEnabled()) { glstate.depthTest.enable(); glstate.depthFunc.set(GL_ALWAYS); - glstate.depthWrite.set(depthMask ? GL_TRUE : GL_FALSE); + glstate.depthWrite.set(depthMask || !gstate.isFogEnabled() || !gstate.isDepthWriteEnabled() ? GL_TRUE : GL_FALSE); } else { glstate.depthTest.enable(); glstate.depthFunc.set(GL_ALWAYS);