mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 17:30:51 +00:00
- don't make assumptions about refreshfreq when calculating smoothratio.
This commit is contained in:
parent
5c3c55b6cd
commit
22a940c922
1 changed files with 1 additions and 3 deletions
|
@ -874,9 +874,7 @@ int CalcSmoothRatio(const ClockTicks &totalclk, const ClockTicks &ototalclk, int
|
|||
{
|
||||
const double TICRATE = 120.;
|
||||
|
||||
double rfreq = (refreshfreq != -1 ? refreshfreq : 60);
|
||||
rfreq = rfreq * TICRATE / timerGetClockRate();
|
||||
|
||||
double rfreq = refreshfreq * TICRATE / timerGetClockRate();
|
||||
double elapsedTime = (totalclk - ototalclk).toScale16F();
|
||||
double elapsedFrames = elapsedTime * rfreq * (1. / TICRATE);
|
||||
double ratio = (elapsedFrames * realgameticspersec) / rfreq;
|
||||
|
|
Loading…
Reference in a new issue