summaryrefslogtreecommitdiffstats
path: root/src/render/Draw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/Draw.cpp')
-rw-r--r--src/render/Draw.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp
index 922d96d4..f825ba42 100644
--- a/src/render/Draw.cpp
+++ b/src/render/Draw.cpp
@@ -20,12 +20,24 @@ uint8 &CDraw::FadeBlue = *(uint8*)0x95CD53;
float
CDraw::FindAspectRatio(void)
{
+#ifndef ASPECT_RATIO_SCALE
if(FrontEndMenuManager.m_PrefsUseWideScreen)
return 16.0f/9.0f;
else
return 4.0f/3.0f;
+#else
+ switch (FrontEndMenuManager.m_PrefsUseWideScreen) {
+ case AR_AUTO:
+ return SCREEN_WIDTH / SCREEN_HEIGHT;
+ case AR_4_3:
+ return 4.0f / 3.0f;
+ case AR_16_9:
+ return 16.0f / 9.0f;
+ };
+#endif
}
+#ifdef ASPECT_RATIO_SCALE
// convert a 4:3 hFOV to vFOV,
// then convert that vFOV to hFOV for our aspect ratio,
// i.e. HOR+
@@ -41,6 +53,7 @@ CDraw::ConvertFOV(float hfov)
hfov = atan(tan(vfov/2) * ar2) *2;
return RADTODEG(hfov);
}
+#endif
void
CDraw::SetFOV(float fov)