mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-30 16:00:55 +00:00
- fixed fullscreen scaling for narrow aspect ratios.
This commit is contained in:
parent
74925783aa
commit
54ddb400a5
1 changed files with 4 additions and 4 deletions
|
@ -350,9 +350,9 @@ void CalcFullscreenScale(DrawParms *parms, double srcwidth, double srcheight, in
|
||||||
}
|
}
|
||||||
|
|
||||||
double aspect;
|
double aspect;
|
||||||
if (srcheight == 200) aspect = srcwidth / 240.;
|
if (srcheight == 200) srcheight = 240.;
|
||||||
else if (srcheight == 400) aspect = srcwidth / 480;
|
else if (srcheight == 400) srcheight = 480;
|
||||||
else aspect = srcwidth / srcheight;
|
aspect = srcwidth / srcheight;
|
||||||
rect.left = rect.top = 0;
|
rect.left = rect.top = 0;
|
||||||
auto screenratio = ActiveRatio(GetWidth(), GetHeight());
|
auto screenratio = ActiveRatio(GetWidth(), GetHeight());
|
||||||
if (autoaspect == FSMode_ScaleToFit43 || autoaspect == FSMode_ScaleToFit43Top || autoaspect == FSMode_ScaleToFit43Bottom)
|
if (autoaspect == FSMode_ScaleToFit43 || autoaspect == FSMode_ScaleToFit43Top || autoaspect == FSMode_ScaleToFit43Bottom)
|
||||||
|
@ -366,7 +366,7 @@ void CalcFullscreenScale(DrawParms *parms, double srcwidth, double srcheight, in
|
||||||
double width4_3 = srcheight * (4. / 3.);
|
double width4_3 = srcheight * (4. / 3.);
|
||||||
rect.width = (double)GetWidth() * srcwidth / width4_3;
|
rect.width = (double)GetWidth() * srcwidth / width4_3;
|
||||||
rect.height = GetHeight() * screenratio * (3. / 4.); // use 4:3 for the image
|
rect.height = GetHeight() * screenratio * (3. / 4.); // use 4:3 for the image
|
||||||
rect.left = -(srcwidth - width4_3) / 2;
|
rect.left = (double)GetWidth() * (-(srcwidth - width4_3) / 2) / width4_3;
|
||||||
switch (oautoaspect)
|
switch (oautoaspect)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue