mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 07:12:03 +00:00
Merge branch 'match-refresh-vsync' into 'master'
Don't sleep w/ fpscap 0 and vsync enabled See merge request KartKrew/Kart-Public!294
This commit is contained in:
commit
2f17fdca6c
1 changed files with 5 additions and 1 deletions
|
@ -799,7 +799,11 @@ void D_SRB2Loop(void)
|
|||
if (!singletics)
|
||||
{
|
||||
INT64 elapsed = (INT64)(finishprecise - enterprecise);
|
||||
if (elapsed > 0 && (INT64)capbudget > elapsed)
|
||||
|
||||
// in the case of "match refresh rate" + vsync, don't sleep at all
|
||||
const boolean vsync_with_match_refresh = cv_vidwait.value && cv_fpscap.value == 0;
|
||||
|
||||
if (elapsed > 0 && (INT64)capbudget > elapsed && !vsync_with_match_refresh)
|
||||
{
|
||||
I_SleepDuration(capbudget - (finishprecise - enterprecise));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue