Skip to content
Snippets Groups Projects
Commit b2fa9e4b authored by Eidolon's avatar Eidolon Committed by Sal
Browse files

Don't sleep w/ fpscap 0 and vsync enabled

parent 88667400
No related branches found
No related tags found
1 merge request!1865Don't sleep w/ fpscap 0 and vsync enabled
......@@ -895,7 +895,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));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment