From d9ec14e048fd1a485ea3caac8b755f1ac0ecd6ba Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Tue, 9 May 2023 21:28:22 +0200 Subject: [PATCH] rend: rtt can also use SCALER_CTL.hscale Issue #1025 --- core/rend/transform_matrix.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/rend/transform_matrix.h b/core/rend/transform_matrix.h index 19af8ddcb..f3291354d 100644 --- a/core/rend/transform_matrix.h +++ b/core/rend/transform_matrix.h @@ -111,6 +111,8 @@ public: if (renderingContext->isRTT) { dcViewport.x = (float)(renderingContext->fb_X_CLIP.max - renderingContext->fb_X_CLIP.min + 1); + if (renderingContext->scaler_ctl.hscale) + dcViewport.x *= 2; dcViewport.y = (float)(renderingContext->fb_Y_CLIP.max - renderingContext->fb_Y_CLIP.min + 1); normalMatrix = glm::translate(glm::vec3(-1, -rttFlipY, 0)) * glm::scale(glm::vec3(2.0f / dcViewport.x, 2.0f / dcViewport.y * rttFlipY, 1.f));