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.cpp36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp
index 4e323ec2..912399c9 100644
--- a/src/render/Draw.cpp
+++ b/src/render/Draw.cpp
@@ -21,24 +21,28 @@ uint8 CDraw::FadeGreen;
uint8 CDraw::FadeBlue;
float
-CDraw::FindAspectRatio(void)
+CDraw::CalculateAspectRatio(void)
{
-#ifndef ASPECT_RATIO_SCALE
- if(FrontEndMenuManager.m_PrefsUseWideScreen)
- return 16.0f/9.0f;
- else
- return 4.0f/3.0f;
+ if (FrontEndMenuManager.m_PrefsUseWideScreen) {
+#ifdef ASPECT_RATIO_SCALE
+ if (TheCamera.m_WideScreenOn)
+ CDraw::ms_fAspectRatio = FrontEndMenuManager.m_PrefsUseWideScreen == AR_AUTO ?
+ (5.f / 3.f) * (SCREEN_WIDTH / SCREEN_HEIGHT) / (16.f / 9.f) :
+ 5.f / 3.f; // It's used on theatrical showings according to Wiki
+ else
+ CDraw::ms_fAspectRatio = FrontEndMenuManager.m_PrefsUseWideScreen == AR_AUTO ? SCREEN_WIDTH / SCREEN_HEIGHT : 16.f / 9.f;
#else
- switch (FrontEndMenuManager.m_PrefsUseWideScreen) {
- case AR_AUTO:
- return SCREEN_WIDTH / SCREEN_HEIGHT;
- default:
- case AR_4_3:
- return 4.0f / 3.0f;
- case AR_16_9:
- return 16.0f / 9.0f;
- };
+ if (TheCamera.m_WideScreenOn)
+ CDraw::ms_fAspectRatio = 5.f / 3.f; // It's used on theatrical showings according to Wiki
+ else
+ CDraw::ms_fAspectRatio = 16.f / 9.f;
#endif
+ } else if (TheCamera.m_WideScreenOn) {
+ CDraw::ms_fAspectRatio = 5.f/4.f;
+ } else {
+ CDraw::ms_fAspectRatio = 4.f/3.f;
+ }
+ return CDraw::ms_fAspectRatio;
}
#ifdef ASPECT_RATIO_SCALE
@@ -80,4 +84,4 @@ ScaleAndCenterX(float x)
else
return (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X(x);
}
-#endif \ No newline at end of file
+#endif \ No newline at end of file