diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2020-05-26 21:16:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 21:16:56 +0200 |
commit | ae8a377f26f9b56b5156b0462c30c5c49af7dd8a (patch) | |
tree | f15b8d6bb195ad71ffd9e7051c26a5b42e2f71a7 /src/render/Draw.cpp | |
parent | Merge pull request #550 from erorcun/miami (diff) | |
parent | fix UB shit (diff) | |
download | re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.gz re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.bz2 re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.lz re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.xz re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.zst re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.zip |
Diffstat (limited to 'src/render/Draw.cpp')
-rw-r--r-- | src/render/Draw.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp index b31cc624..e2dfc8d9 100644 --- a/src/render/Draw.cpp +++ b/src/render/Draw.cpp @@ -19,24 +19,23 @@ 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) { + if (TheCamera.m_WideScreenOn) + CDraw::ms_fAspectRatio = 5.f / 3.f; // It's used on theatrical showings according to Wiki + else +#ifdef ASPECT_RATIO_SCALE + 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; - }; + 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 |