mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Revert "Rework GLimp_GetRefreshRate(), fix a stupid bug."
After some pondering I realised that the changes was stupid. It introduces some new subtile bugs, for example in some cases SDL still rounds 59.95hz down to 59hz...
This commit is contained in:
parent
95bbb9900b
commit
70ee5bcc4a
1 changed files with 9 additions and 2 deletions
|
@ -377,7 +377,7 @@ GLimp_GetRefreshRate(void)
|
||||||
|
|
||||||
if (vid_displayrefreshrate->value > -1)
|
if (vid_displayrefreshrate->value > -1)
|
||||||
{
|
{
|
||||||
glimp_refreshRate = floor(vid_displayrefreshrate->value);
|
glimp_refreshRate = ceil(vid_displayrefreshrate->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do this only once. We asume that no one will change their
|
/* Do this only once. We asume that no one will change their
|
||||||
|
@ -401,5 +401,12 @@ GLimp_GetRefreshRate(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The value reported by SDL may be one frame too low, for example
|
||||||
|
on my old Radeon R7 360 the driver returns 59hz for my 59.95hz
|
||||||
|
display. And Quake II isn't that accurate, we loose a little bit
|
||||||
|
here and there. Since it doesn't really hurt if we're running a
|
||||||
|
litte bit too fast just return one frame more than we really have. */
|
||||||
|
glimp_refreshRate++;
|
||||||
|
|
||||||
return glimp_refreshRate;
|
return glimp_refreshRate;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue