mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-03-02 06:42:41 +00:00
- fixed fullscreen scaling for narrow aspect ratios.
# Conflicts: # src/v_draw.cpp
This commit is contained in:
parent
274ac25223
commit
1c32d22b3e
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue