Fix aspect determination from showview in fullscreen mode.

This makes the splitscreen mod not have a ridiculous view distortion.
Such scenes will have no correction for non-square pixels, though.

git-svn-id: https://svn.eduke32.com/eduke32@3020 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-09-15 15:28:21 +00:00
parent f662911008
commit 6389874b5d

View file

@ -13567,20 +13567,27 @@ void setaspect_new()
const int32_t xd = setaspect_new_use_dimen ? xdimen : xdim; const int32_t xd = setaspect_new_use_dimen ? xdimen : xdim;
const int32_t yd = setaspect_new_use_dimen ? ydimen : ydim; const int32_t yd = setaspect_new_use_dimen ? ydimen : ydim;
if (fullscreen) if (fullscreen && !setaspect_new_use_dimen)
{ {
int32_t pixratio; const int32_t screenw = r_screenxy/100;
const int32_t screenh = r_screenxy%100;
x=r_screenxy/100; y=r_screenxy%100; if (screenw==0 || screenh==0)
if (y==0 || x==0)
{ {
// Assume square pixel aspect. // Assume square pixel aspect.
x = xdim; x = xd;
y = ydim; y = yd;
} }
else
{
int32_t pixratio;
pixratio = divscale16(xd*y, yd*x); x = screenw;
yx = divscale16(yx, pixratio); y = screenh;
pixratio = divscale16(xdim*screenh, ydim*screenw);
yx = divscale16(yx, pixratio);
}
} }
else else
{ {