From b5a6824a9b0ff54f2e8ea4039ecd20c5a91420cc Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 16 Oct 2023 01:41:57 +0200 Subject: [PATCH] Attempted fix for 4:3 integer scale. --- src/qt/qt_renderercommon.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/qt/qt_renderercommon.cpp b/src/qt/qt_renderercommon.cpp index 9640af181..19a6d359f 100644 --- a/src/qt/qt_renderercommon.cpp +++ b/src/qt/qt_renderercommon.cpp @@ -80,6 +80,18 @@ RendererCommon::onResize(int width, int height) case FULLSCR_SCALE_INT43: gsr = gw / gh; + if (video_fullscreen_scale == FULLSCR_SCALE_INT43) { + if (r43 <= gsr) { + gw = gh * r43; + gh = gh; + } else { + gh = gw / r43; + gw = gw; + } + + gsr = r43; + } + if (gsr <= hsr) { dw = hh * gsr; dh = hh; @@ -91,16 +103,6 @@ RendererCommon::onResize(int width, int height) integer_scale(&dw, &gw); integer_scale(&dh, &gh); - if (video_fullscreen_scale == FULLSCR_SCALE_INT43) { - if (r43 <= gsr) { - dw = dh * r43; - dh = dh; - } else { - dh = dw / r43; - dw = dw; - } - } - dx = (hw - dw) / 2.0; dy = (hh - dh) / 2.0; destination.setRect((int) dx, (int) dy, (int) dw, (int) dh);