- fixed fullscreen scaling for narrow aspect ratios.

# Conflicts:
#	src/v_draw.cpp
This commit is contained in:
Christoph Oelckers 2020-10-24 12:07:05 +02:00 committed by drfrag
parent 274ac25223
commit 1c32d22b3e

View file

@ -360,9 +360,9 @@ void DCanvas::CalcFullscreenScale(double srcwidth, double srcheight, int autoasp
{
double aspect;
if (srcheight == 200) aspect = srcwidth / 240.;
else if (srcheight == 400) aspect = srcwidth / 480;
else aspect = srcwidth / srcheight;
if (srcheight == 200) srcheight = 240.;
else if (srcheight == 400) srcheight = 480;
aspect = srcwidth / srcheight;
rect.left = rect.top = 0;
auto screenratio = ActiveRatio(GetWidth(), GetHeight());
if (autoaspect == 3)
@ -376,7 +376,7 @@ void DCanvas::CalcFullscreenScale(double srcwidth, double srcheight, int autoasp
rect.width = (double)GetWidth() * srcwidth / width4_3;
rect.height = GetHeight() * screenratio * (3. / 4.); // use 4:3 for the image
rect.top = (GetHeight() - rect.height) / 2;
rect.left = -(srcwidth - width4_3) / 2;
rect.left = (double)GetWidth() * (-(srcwidth - width4_3) / 2) / width4_3;
return;
}
}