cvar_t scr_printspeed = {0, "scr_printspeed","8"};
cvar_t vid_conwidth = {CVAR_SAVE, "vid_conwidth", "640"};
cvar_t vid_conheight = {CVAR_SAVE, "vid_conheight", "480"};
+cvar_t vid_pixelaspect = {CVAR_SAVE, "vid_pixelaspect", "1"};
cvar_t scr_screenshot_jpeg = {CVAR_SAVE, "scr_screenshot_jpeg","0"};
cvar_t scr_screenshot_jpeg_quality = {CVAR_SAVE, "scr_screenshot_jpeg_quality","0.9"};
cvar_t scr_screenshot_name = {0, "scr_screenshot_name","dp"};
Cvar_RegisterVariable (&scr_printspeed);
Cvar_RegisterVariable (&vid_conwidth);
Cvar_RegisterVariable (&vid_conheight);
+ Cvar_RegisterVariable (&vid_pixelaspect);
Cvar_RegisterVariable (&scr_screenshot_jpeg);
Cvar_RegisterVariable (&scr_screenshot_jpeg_quality);
Cvar_RegisterVariable (&cl_avidemo);
extern cvar_t vid_conwidth;
extern cvar_t vid_conheight;
+extern cvar_t vid_pixelaspect;
extern cvar_t scr_screenshot_jpeg;
extern cvar_t scr_screenshot_jpeg_quality;
extern cvar_t scr_screenshot_name;
float CalcFov (float fov_x, float width, float height)
{
// calculate vision size and alter by aspect, then convert back to angle
- return atan (height / (width / tan(fov_x/360*M_PI))) * 360 / M_PI;
+ return atan (((height/width)/vid_pixelaspect.value)*tan(fov_x/360.*M_PI))*360./M_PI;
}
/*