From b35e89f6467d31830c11cf0a69931e63b5a18fe5 Mon Sep 17 00:00:00 2001 From: raven02 Date: Sat, 27 Jul 2013 18:45:48 +0800 Subject: [PATCH] Fix rear mirror in Ridge Racer 2 --- GPU/GLES/StateMapping.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GPU/GLES/StateMapping.cpp b/GPU/GLES/StateMapping.cpp index 6b9683be58..46c7f3da59 100644 --- a/GPU/GLES/StateMapping.cpp +++ b/GPU/GLES/StateMapping.cpp @@ -362,8 +362,9 @@ void TransformDrawEngine::ApplyDrawState(int prim) { vpWidth *= renderWidthFactor; vpHeight *= renderHeightFactor; + vpX0 = (vpXb - offsetX - fabsf(vpXa)) * renderWidthFactor; // Flip vpY0 to match the OpenGL coordinate system. - vpY0 = renderHeight - (vpYb - offsetY + fabsf(vpYa)) * renderHeightFactor; + vpY0 = renderHeight - (vpYb - offsetY + fabsf(vpYa)) * renderHeightFactor; glstate.viewport.set(vpX0 + renderX, vpY0 + renderY, vpWidth, vpHeight); // Sadly, as glViewport takes integers, we will not be able to support sub pixel offsets this way. But meh.