MCPcopy Create free account
hub / github.com/crossuo/crossuo / SetClientFPS

Method SetClientFPS

src/Managers/ConfigManager.cpp:572–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570}
571
572void CConfigManager::SetClientFPS(int val)
573{
574 m_ClientFPS = val;
575 if (this == &g_ConfigManager)
576 {
577 if (m_ClientFPS < MIN_FPS_LIMIT)
578 {
579 m_ClientFPS = MIN_FPS_LIMIT;
580 }
581 else if (m_ClientFPS > MAX_FPS_LIMIT)
582 {
583 m_ClientFPS = MAX_FPS_LIMIT;
584 }
585
586 if (m_ClientFPS == MIN_FPS_LIMIT)
587 {
588 g_FrameDelay[WINDOW_ACTIVE] = 80;
589 }
590 else
591 {
592 g_FrameDelay[WINDOW_ACTIVE] = 1000 / m_ClientFPS;
593 }
594
595 if (!m_ReduceFPSUnactiveWindow)
596 {
597 g_FrameDelay[WINDOW_INACTIVE] = g_FrameDelay[WINDOW_ACTIVE];
598 }
599 g_GameWindow.SetRenderTimerDelay(g_FrameDelay[g_GameWindow.IsActive()]);
600 }
601}
602
603void CConfigManager::SetUseScaling(bool val)
604{

Callers 3

ValueIntMethod · 0.80
GumpOptions.cppFile · 0.80
ApplyPageChangesMethod · 0.80

Calls 2

SetRenderTimerDelayMethod · 0.80
IsActiveMethod · 0.45

Tested by

no test coverage detected