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

Adjust how FPS cap is checked to improve FPS stability

parent 6e5e74b2
No related branches found
No related tags found
No related merge requests found
......@@ -723,6 +723,7 @@ void D_SRB2Loop(void)
boolean ticked;
boolean interp;
boolean doDisplay = false;
boolean frameCap = false;
if (dedicated)
server = true;
......@@ -803,12 +804,26 @@ void D_SRB2Loop(void)
doDisplay = false;
ticked = false;
if (!realtics && !singletics && !interp)
frameCap = false;
if (interp)
{
frameCap = D_CheckFrameCap();
}
if (!realtics && !singletics)
{
if (interp)
{
if (frameCap)
continue;
}
else
{
// Non-interp sleep
I_Sleep();
continue;
}
}
#ifdef HW3SOUND
HW3S_BeginFrameUpdate();
......@@ -869,7 +884,7 @@ void D_SRB2Loop(void)
// TryRunTics needs ran if possible to prevent lagged map changes,
// (and if that runs, the code above needs to also run)
// so this is done here after TryRunTics.
if (D_CheckFrameCap())
if (frameCap)
{
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment