From 7cf95a9b0ff92d383afb4df584cca50d9cc862aa Mon Sep 17 00:00:00 2001 From: helixhorned Date: Mon, 9 Apr 2012 19:22:31 +0000 Subject: [PATCH] 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 --- polymer/eduke32/build/src/engine.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 40488d6aa..4f69af9d8 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -13266,8 +13266,13 @@ void setaspect_new() if (fullscreen) { + int32_t pixratio; + x=r_screenxy/100; y=r_screenxy%100; if (y==0 || x==0) { x=4; y=3; } + + pixratio = divscale16(xdim*y, ydim*x); + yx = divscale16(yx, pixratio); } else { @@ -13275,7 +13280,7 @@ void setaspect_new() y = ydim; } - vr = (65536*x*3)/(y*4); + vr = divscale16(x*3, y*4); setaspect(vr, yx); }