Base FOV adapting on screen resolution instead of viewport resolution.

By doing this we still adapt to widescreen resolutions automatically,
but we now keep the horizontal FOV a constant for any given resolution.
E.g. if the aspect of the viewport changes (for instance when the user
changes the statusbar from transparent to solid) we adapt the vertical
FOV instead of the horizontal FOV (like original GLQuake does). For any
4:3 screen resolution quakespasm now behaves the same with or without
fov_adapt set, regardless of viewport size/aspect. This fixes the issue
reported by mh at http://forums.inside3d.com/viewtopic.php?f=1&t=5166.



git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@872 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
svdijk 2013-10-12 16:20:38 +00:00
parent dd34178716
commit c5c7dc4e3d

View file

@ -321,7 +321,7 @@ static void SCR_CalcRefdef (void)
r_refdef.vrect.y = (glheight - sb_lines - r_refdef.vrect.height)/2; r_refdef.vrect.y = (glheight - sb_lines - r_refdef.vrect.height)/2;
//johnfitz //johnfitz
r_refdef.fov_x = AdaptFovx(scr_fov.value, r_refdef.vrect.width, r_refdef.vrect.height); r_refdef.fov_x = AdaptFovx(scr_fov.value, vid.width, vid.height);
r_refdef.fov_y = CalcFovy (r_refdef.fov_x, r_refdef.vrect.width, r_refdef.vrect.height); r_refdef.fov_y = CalcFovy (r_refdef.fov_x, r_refdef.vrect.width, r_refdef.vrect.height);
scr_vrect = r_refdef.vrect; scr_vrect = r_refdef.vrect;