From a29255b647a6a8ccee71da924ae03b019369ca31 Mon Sep 17 00:00:00 2001 From: raven02 Date: Mon, 14 Apr 2014 11:40:04 +0800 Subject: [PATCH] Fix wrong stretch in Wildarm XF (non-buffered mode) --- GPU/GLES/StateMapping.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/StateMapping.cpp b/GPU/GLES/StateMapping.cpp index e6a7eb688c..e771c0bf25 100644 --- a/GPU/GLES/StateMapping.cpp +++ b/GPU/GLES/StateMapping.cpp @@ -451,16 +451,17 @@ void TransformDrawEngine::ApplyDrawState(int prim) { renderY = 0.0f; renderWidth = framebufferManager_->GetRenderWidth(); renderHeight = framebufferManager_->GetRenderHeight(); + renderWidthFactor = (float)renderWidth / framebufferManager_->GetTargetWidth(); + renderHeightFactor = (float)renderHeight / framebufferManager_->GetTargetHeight(); } else { // TODO: Aspect-ratio aware and centered float pixelW = PSP_CoreParameter().pixelWidth; float pixelH = PSP_CoreParameter().pixelHeight; CenterRect(&renderX, &renderY, &renderWidth, &renderHeight, 480, 272, pixelW, pixelH); + renderWidthFactor = renderWidth / 480.0f; + renderHeightFactor = renderHeight / 272.0f; } - renderWidthFactor = (float)renderWidth / framebufferManager_->GetTargetWidth(); - renderHeightFactor = (float)renderHeight / framebufferManager_->GetTargetHeight(); - bool throughmode = gstate.isModeThrough(); // Scissor