From cf28556d6d2f3e64ccbd4b185f42b3eadaa247c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 5 Apr 2023 09:48:28 +0200 Subject: [PATCH] When integer scaling, take the internal render resolution into account. --- GPU/Common/PresentationCommon.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPU/Common/PresentationCommon.cpp b/GPU/Common/PresentationCommon.cpp index 4d2e2fa2d2..b3b8a436d9 100644 --- a/GPU/Common/PresentationCommon.cpp +++ b/GPU/Common/PresentationCommon.cpp @@ -127,6 +127,9 @@ void CalculateDisplayOutputRect(FRect *rc, float origW, float origH, const FRect if (rotated) { wDim = 272.0f; } + // If integer scaling, limit ourselves to even multiples of the rendered resolution, + // to make sure all the pixels are square. + wDim *= g_Config.iInternalResolution; outW = std::max(1.0f, floorf(outW / wDim)) * wDim; outH = outW / origRatio; }