summaryrefslogtreecommitdiffstats
path: root/src/core/Frontend.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-06-24 20:19:12 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 23:40:00 +0200
commite5aa150557e44466158a680216102adf687e1f0b (patch)
tree3881a82f17c5bbd63538944731ee10bea4587f73 /src/core/Frontend.cpp
parentHigh FPS Fixes (diff)
downloadre3-e5aa150557e44466158a680216102adf687e1f0b.tar
re3-e5aa150557e44466158a680216102adf687e1f0b.tar.gz
re3-e5aa150557e44466158a680216102adf687e1f0b.tar.bz2
re3-e5aa150557e44466158a680216102adf687e1f0b.tar.lz
re3-e5aa150557e44466158a680216102adf687e1f0b.tar.xz
re3-e5aa150557e44466158a680216102adf687e1f0b.tar.zst
re3-e5aa150557e44466158a680216102adf687e1f0b.zip
Diffstat (limited to 'src/core/Frontend.cpp')
-rw-r--r--src/core/Frontend.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 2160d8ce..190cdf32 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -1429,15 +1429,17 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
if (m_nOptionHighlightTransitionBlend <= 255) {
static uint32 blendChangeCounter = 0;
if (CTimer::GetTimeInMillisecondsPauseMode() - lastBlendChange > 20
-#ifndef FIX_HIGH_FPS_BUGS_ON_FRONTEND // Dirty dirty hack
|| blendChangeCounter > 20
-#endif
) {
m_nOptionHighlightTransitionBlend += 50;
lastBlendChange = CTimer::GetTimeInMillisecondsPauseMode();
blendChangeCounter = 0;
}
+#ifdef FIX_BUGS
+ blendChangeCounter += CTimer::GetLogicalFramesPassed();
+#else
++blendChangeCounter;
+#endif
}
}
@@ -2382,17 +2384,22 @@ CMenuManager::DrawBackground(bool transitionCall)
if (m_nMenuFadeAlpha < 255) {
static uint8 forceFadeInCounter = 0;
if (CTimer::GetTimeInMillisecondsPauseMode() - LastFade > 30
-#ifndef FIX_HIGH_FPS_BUGS_ON_FRONTEND // Dirty dirty hack
|| forceFadeInCounter > 30
-#endif
) {
m_nMenuFadeAlpha += 20;
if (m_firstStartCounter < 255) {
m_firstStartCounter = Min(m_firstStartCounter + 20, 255);
}
LastFade = CTimer::GetTimeInMillisecondsPauseMode();
+#ifdef FIX_BUGS
+ forceFadeInCounter = 0;
+#endif
}
+#ifdef FIX_BUGS
+ forceFadeInCounter += CTimer::GetLogicalFramesPassed();
+#else
forceFadeInCounter++;
+#endif
} else if (m_nMenuFadeAlpha > 255)
m_nMenuFadeAlpha = 255;