- use 1/8 of delta time as initial elapsed time when calculating smoothratio on a new ototalclk.

* Pushes final result closer to 65536 and always ensures smoothratio never starts at 0.
This commit is contained in:
Mitchell Richters 2020-08-02 11:09:16 +10:00 committed by Christoph Oelckers
parent 4830989d32
commit 3861064f62
1 changed files with 1 additions and 1 deletions

View File

@ -1060,7 +1060,7 @@ int CalcSmoothRatio(const ClockTicks &totalclk, const ClockTicks &ototalclk, int
else
{
lastototalclk = ototalclk;
elapsedTime = 0;
elapsedTime = lastTime != 0 ? (currentTime - lastTime) / 8 : 0;
}
lastTime = currentTime;
ratio = elapsedTime / gametics;