From babef459b0a68a6dd425b724208bc38eee678bfe Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Wed, 30 Aug 2023 22:40:31 +0200 Subject: [PATCH] Account for HiDPI scaling when validating QIS blitter. --- src/common/FBSurfaceSDL2.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/FBSurfaceSDL2.cxx b/src/common/FBSurfaceSDL2.cxx index 288341b4f..2de4aa737 100644 --- a/src/common/FBSurfaceSDL2.cxx +++ b/src/common/FBSurfaceSDL2.cxx @@ -281,8 +281,12 @@ void FBSurfaceSDL2::applyAttributes() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void FBSurfaceSDL2::setScalingInterpolation(ScalingInterpolation interpolation) { - if (interpolation == ScalingInterpolation::sharp - && mySrcGUIR.h() >= myDstGUIR.h()) + if (interpolation == ScalingInterpolation::sharp && + ( + static_cast(mySrcGUIR.h()) >= myBackend.scaleY(myDstGUIR.h()) || + static_cast(mySrcGUIR.w()) >= myBackend.scaleX(myDstGUIR.w()) + ) + ) interpolation = ScalingInterpolation::blur; if (interpolation == myInterpolationMode) return;