+void SCR_UpdateVars(void)
+{
+ float conwidth = bound(160, vid_conwidth.value, 32768);
+ float conheight = bound(90, vid_conheight.value, 24576);
+ if (vid_conwidthauto.integer)
+ conwidth = floor(conheight * vid.width / (vid.height * vid_pixelheight.value));
+ if (vid_conwidth.value != conwidth)
+ Cvar_SetValue("vid_conwidth", conwidth);
+ if (vid_conheight.value != conheight)
+ Cvar_SetValue("vid_conheight", conheight);
+
+ // bound viewsize
+ if (scr_viewsize.value < 30)
+ Cvar_Set("viewsize", "30");
+ if (scr_viewsize.value > 120)
+ Cvar_Set("viewsize", "120");
+
+ // bound field of view
+ if (scr_fov.value < 1)
+ Cvar_Set("fov", "1");
+ if (scr_fov.value > 170)
+ Cvar_Set("fov", "170");
+
+ // intermission is always full screen
+ if (cl.intermission)
+ sb_lines = 0;
+ else
+ {
+ if (scr_viewsize.value >= 120)
+ sb_lines = 0; // no status bar at all
+ else if (scr_viewsize.value >= 110)
+ sb_lines = 24; // no inventory
+ else
+ sb_lines = 24 + 16 + 8;
+ }
+}
+