Merge pull request #364 from erorcun/erorcun

Limit frontend FPS to 100
This commit is contained in:
erorcun 2020-03-28 23:29:28 +03:00 committed by GitHub
commit 7242d8a440
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2056,7 +2056,13 @@ _WinMain(HINSTANCE instance,
{ {
GetWindowPlacement(PSGLOBAL(window), &wp); GetWindowPlacement(PSGLOBAL(window), &wp);
// 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) if (wp.showCmd != SW_SHOWMINIMIZED)
#endif
RsEventHandler(rsFRONTENDIDLE, nil); RsEventHandler(rsFRONTENDIDLE, nil);
if ( !FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager.m_bLoadingSavedGame ) if ( !FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager.m_bLoadingSavedGame )