mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
style fixes and remove float cast
This commit is contained in:
parent
5e1bee2760
commit
081057d6b9
|
@ -2790,7 +2790,7 @@ void CClient::Run()
|
||||||
|
|
||||||
if((g_Config.m_GfxBackgroundRender || m_pGraphics->WindowOpen())
|
if((g_Config.m_GfxBackgroundRender || m_pGraphics->WindowOpen())
|
||||||
&& (!g_Config.m_GfxAsyncRenderOld || m_pGraphics->IsIdle())
|
&& (!g_Config.m_GfxAsyncRenderOld || m_pGraphics->IsIdle())
|
||||||
&& (!g_Config.m_GfxRefreshRate || ((int64)((float)time_freq() / (float)g_Config.m_GfxRefreshRate)) <= Now - LastRenderTime))
|
&& (!g_Config.m_GfxRefreshRate || (time_freq() / (int64)g_Config.m_GfxRefreshRate) <= Now - LastRenderTime))
|
||||||
{
|
{
|
||||||
m_RenderFrames++;
|
m_RenderFrames++;
|
||||||
|
|
||||||
|
@ -2803,7 +2803,7 @@ void CClient::Run()
|
||||||
m_FpsGraph.Add(1.0f/m_RenderFrameTime, 1,1,1);
|
m_FpsGraph.Add(1.0f/m_RenderFrameTime, 1,1,1);
|
||||||
|
|
||||||
// keep the overflow time - it's used to make sure the gfx refreshrate is reached
|
// keep the overflow time - it's used to make sure the gfx refreshrate is reached
|
||||||
int64 AdditionalTime = g_Config.m_GfxRefreshRate ? ((Now - LastRenderTime) - (int64)((float)time_freq() / (float)g_Config.m_GfxRefreshRate)) : 0;
|
int64 AdditionalTime = g_Config.m_GfxRefreshRate ? ((Now - LastRenderTime) - (time_freq() / (int64)g_Config.m_GfxRefreshRate)) : 0;
|
||||||
// if the value is over a second time loose, reset the additional time (drop the frames, that are lost already)
|
// if the value is over a second time loose, reset the additional time (drop the frames, that are lost already)
|
||||||
if(AdditionalTime > time_freq())
|
if(AdditionalTime > time_freq())
|
||||||
AdditionalTime = time_freq();
|
AdditionalTime = time_freq();
|
||||||
|
|
Loading…
Reference in a new issue