forked from teamnwah/openmw-tes3coop
minimum framerate fix
This commit is contained in:
parent
86b6184f43
commit
6acb777c5a
1 changed files with 6 additions and 1 deletions
|
@ -643,7 +643,12 @@ namespace MWWorld
|
||||||
|
|
||||||
// Game clock part of the loop, contains everything that has to be executed in a fixed timestep
|
// Game clock part of the loop, contains everything that has to be executed in a fixed timestep
|
||||||
long long dt = mTimer.getMilliseconds() - lastTick;
|
long long dt = mTimer.getMilliseconds() - lastTick;
|
||||||
if (dt >= 100) dt = 100; // throw away wall clock time if necessary to keep the framerate above the minimum of 10 fps
|
if (dt >= 100)
|
||||||
|
{
|
||||||
|
// throw away wall clock time if necessary to keep the framerate above the minimum of 10 fps
|
||||||
|
lastTick += (dt - 100);
|
||||||
|
dt = 100;
|
||||||
|
}
|
||||||
while (dt >= tick)
|
while (dt >= tick)
|
||||||
{
|
{
|
||||||
dt -= tick;
|
dt -= tick;
|
||||||
|
|
Loading…
Reference in a new issue