Skip to content

Commit

Permalink
Eco render only in main menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Apr 30, 2018
1 parent 06ce6a6 commit 3e6922e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/xrEngine/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,14 @@ void CRenderDevice::on_idle()
}

// Eco render (by alpet)
u32 updateDelta = 10;
u32 updateDelta = 0;

if (GEnv.isDedicatedServer)
updateDelta = 1000 / g_svDedicateServerUpdateReate;

else if (Device.Paused() || IGame_Persistent::IsMainMenuActive())
updateDelta = 10;

if (frameTime < updateDelta)
Sleep(updateDelta - frameTime);

Expand Down

0 comments on commit 3e6922e

Please sign in to comment.