mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- change division of delta between currentTime and lastTime from 8 to 72 to ensure smoothratio doesn't clip at 65536.
* Divisor of delta is there so smoothratio always starts off with some kind of value. After 10 minutes at 1100 fps, closest final result to 65536 was: ototalclk: 4573 totalclk: 4576 gametics: 33.333 ms elapsedTime: 33.331 ms ratio: 0.999938 result: 65531.941356
This commit is contained in:
parent
70794df76c
commit
348acf95e0
1 changed files with 1 additions and 1 deletions
|
@ -1059,7 +1059,7 @@ double CalcSmoothRatio(ClockTicks totalclk, ClockTicks ototalclk, int realgameti
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lastototalclk = ototalclk;
|
lastototalclk = ototalclk;
|
||||||
elapsedTime = lastTime != 0 ? (currentTime - lastTime) / 8 : 0;
|
elapsedTime = lastTime != 0 ? (currentTime - lastTime) / 72 : 0;
|
||||||
}
|
}
|
||||||
lastTime = currentTime;
|
lastTime = currentTime;
|
||||||
ratio = elapsedTime / gametics;
|
ratio = elapsedTime / gametics;
|
||||||
|
|
Loading…
Reference in a new issue