mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- removed the redundant rfreq factor from CalcSmoothRatio.
I never realized it was redundant when consolidating the interpolation math into one function - originally this was done in a way that it wasn't obvious. This also eliminates the dependency on refreshFreq which never actually made any sense.
This commit is contained in:
parent
df2b3b6b17
commit
893686709b
1 changed files with 2 additions and 3 deletions
|
@ -1022,10 +1022,9 @@ int CalcSmoothRatio(const ClockTicks &totalclk, const ClockTicks &ototalclk, int
|
|||
{
|
||||
const double TICRATE = 120.;
|
||||
|
||||
double rfreq = refreshfreq * TICRATE / timerGetClockRate();
|
||||
double elapsedTime = (totalclk - ototalclk).toScale16F();
|
||||
double elapsedFrames = elapsedTime * rfreq * (1. / TICRATE);
|
||||
double ratio = (elapsedFrames * realgameticspersec) / rfreq;
|
||||
double elapsedFrames = elapsedTime * (1. / TICRATE);
|
||||
double ratio = (elapsedFrames * realgameticspersec);
|
||||
return clamp(xs_RoundToInt(ratio * 65536), 0, 65536);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue