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

Allow dedicated to use precise sleep timing again

Instead of only using one old sleep, just enforce framerate cap to match TICRATE.
parent c3340959
Branches
No related tags found
No related merge requests found
......@@ -892,15 +892,10 @@ void D_SRB2Loop(void)
LUA_Step();
// Fully completed frame made.
if (!singletics && !dedicated)
if (!singletics)
{
I_FrameCapSleep(frameEnd);
}
else if (dedicated)
{
// Preserve the pre-interp sleeping behavior for dedicated mode
I_Sleep();
}
// I_FinishUpdate is now here instead of D_Display,
// because it synchronizes it more closely with the frame counter.
......
......@@ -42,6 +42,13 @@ consvar_t cv_fpscap = CVAR_INIT ("fpscap", "Match refresh rate", CV_SAVE, fpscap
UINT32 R_GetFramerateCap(void)
{
if (rendermode == render_none)
{
// If we're not rendering (dedicated server),
// we shouldn't be using any interpolation.
return TICRATE;
}
if (cv_fpscap.value == 0)
{
// 0: Match refresh rate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment