From c5c7dc4e3dddb1377a4feaf2e56ef27c63f2f5f8 Mon Sep 17 00:00:00 2001 From: svdijk Date: Sat, 12 Oct 2013 16:20:38 +0000 Subject: [PATCH] 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 --- Quake/gl_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Quake/gl_screen.c b/Quake/gl_screen.c index 67a1a4fe..ea66f964 100644 --- a/Quake/gl_screen.c +++ b/Quake/gl_screen.c @@ -321,7 +321,7 @@ static void SCR_CalcRefdef (void) r_refdef.vrect.y = (glheight - sb_lines - r_refdef.vrect.height)/2; //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); scr_vrect = r_refdef.vrect;