summaryrefslogtreecommitdiff
path: root/src/skel/win
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-03-28 23:28:36 +0300
committereray orçunus <erayorcunus@gmail.com>2020-03-28 23:28:36 +0300
commit39c9a0582700ab7242272952edbe211a4dd13935 (patch)
tree538a781c3bb918c5738eb18a4eda6678766f8c6b /src/skel/win
parentc056871e0766c587e45797405f6432715beba810 (diff)
Limit frontend FPS to 100
Diffstat (limited to 'src/skel/win')
-rw-r--r--src/skel/win/win.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp
index f05580cd..4e5dccff 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -2056,7 +2056,13 @@ _WinMain(HINSTANCE instance,
{
GetWindowPlacement(PSGLOBAL(window), &wp);
- if ( wp.showCmd != SW_SHOWMINIMIZED )
+ // Famous transparent menu bug. Also see the fix in Frontend.cpp
+#ifdef FIX_BUGS
+ float ms = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond();
+ if ((1000.0f / 100.0f) < ms && wp.showCmd != SW_SHOWMINIMIZED)
+#else
+ if (wp.showCmd != SW_SHOWMINIMIZED)
+#endif
RsEventHandler(rsFRONTENDIDLE, nil);
if ( !FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager.m_bLoadingSavedGame )