mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 08:30:58 +00:00
Fix aspect correction in fullscreen mode.
Previously, we only set the viewingrange according to the physical screen's dimensions, but didn't correct yxaspect for a potential non-square pixel ratio. git-svn-id: https://svn.eduke32.com/eduke32@2603 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a03eadb22e
commit
7cf95a9b0f
1 changed files with 6 additions and 1 deletions
|
@ -13266,8 +13266,13 @@ void setaspect_new()
|
||||||
|
|
||||||
if (fullscreen)
|
if (fullscreen)
|
||||||
{
|
{
|
||||||
|
int32_t pixratio;
|
||||||
|
|
||||||
x=r_screenxy/100; y=r_screenxy%100;
|
x=r_screenxy/100; y=r_screenxy%100;
|
||||||
if (y==0 || x==0) { x=4; y=3; }
|
if (y==0 || x==0) { x=4; y=3; }
|
||||||
|
|
||||||
|
pixratio = divscale16(xdim*y, ydim*x);
|
||||||
|
yx = divscale16(yx, pixratio);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -13275,7 +13280,7 @@ void setaspect_new()
|
||||||
y = ydim;
|
y = ydim;
|
||||||
}
|
}
|
||||||
|
|
||||||
vr = (65536*x*3)/(y*4);
|
vr = divscale16(x*3, y*4);
|
||||||
|
|
||||||
setaspect(vr, yx);
|
setaspect(vr, yx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue