Account for HiDPI scaling when validating QIS blitter.

This commit is contained in:
Christian Speckner 2023-08-30 22:40:31 +02:00
parent 7c5d302f4f
commit 0c44764693
1 changed files with 6 additions and 2 deletions

View File

@ -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<int>(mySrcGUIR.h()) >= myBackend.scaleY(myDstGUIR.h()) ||
static_cast<int>(mySrcGUIR.w()) >= myBackend.scaleX(myDstGUIR.w())
)
)
interpolation = ScalingInterpolation::blur;
if (interpolation == myInterpolationMode) return;