diff --git a/GPU/Directx9/StateMappingDX9.cpp b/GPU/Directx9/StateMappingDX9.cpp index 4de3ee9a0..c4523cc67 100644 --- a/GPU/Directx9/StateMappingDX9.cpp +++ b/GPU/Directx9/StateMappingDX9.cpp @@ -720,7 +720,7 @@ void TransformDrawEngineDX9::ApplyDrawState(int prim) { // This means that to get the analogue glViewport we must: float vpX0 = vpXCenter - offsetX - fabsf(vpXScale); - float vpY0 = vpYCenter - offsetY - fabsf(vpYScale); // Need to account for sign of Y + float vpY0 = vpYCenter - offsetY - fabsf(vpYScale); gstate_c.vpWidth = vpXScale * 2.0f; gstate_c.vpHeight = vpYScale * 2.0f; diff --git a/GPU/GLES/StateMapping.cpp b/GPU/GLES/StateMapping.cpp index 454226630..a826854cc 100644 --- a/GPU/GLES/StateMapping.cpp +++ b/GPU/GLES/StateMapping.cpp @@ -784,7 +784,7 @@ void TransformDrawEngine::ApplyDrawState(int prim) { // This means that to get the analogue glViewport we must: float vpX0 = vpXCenter - offsetX - fabsf(vpXScale); - float vpY0 = vpYCenter - offsetY + fabsf(vpYScale); + float vpY0 = vpYCenter - offsetY + fabsf(vpYScale); // Need to account for sign of Y gstate_c.vpWidth = vpXScale * 2.0f; gstate_c.vpHeight = -vpYScale * 2.0f;