desktopWidth = sys_metrics(0);
desktopHeight = sys_metrics(1);
if (desktopWidth<1681) video_set(desktopWidth,desktopHeight,0,1);
else
{
if (desktopWidth/4 == desktopHeight/3) //Classic
{
video_set(1024,768,0,1);
desktopWidth = 1024;
desktopHeight = 768;
}
else if (desktopWidth/15 == desktopHeight/9) //BrightView
{
video_set(1280,768,0,1);
desktopWidth = 1280;
desktopHeight = 768;
}
else if (desktopWidth/5 == desktopHeight/4) //SXGA
{
video_set(1280,1024,0,1);
desktopWidth = 1280;
desktopHeight = 1024;
}
else if (desktopWidth/16 == desktopHeight/10) //WSXGA+
{
video_set(1680,1050,0,1);
desktopWidth = 1680;
desktopHeight = 1050;
}
else //Window Mode
{
video_mode = 8;
video_window(nullvector,nullvector,1,NULL);
wait(1); // must put this. not sure the reason
desktopWidth = screen_size.x;
desktopHeight = screen_size.y;
}
}
float fAspect = desktopWidth/desktopHeight;
camera.aspect = fAspect / 1.333333; // Not sure why have to hard code