Revert to before screenUpdate boolean was added

Was done this way for the sake of an older version of uncapped's timing; now that the new timing is much better, I decided it should remain as close to pre-uncapped as it can be.
This commit is contained in:
Sally Coolatta 2022-05-05 00:04:14 -04:00 committed by Eidolon
parent 738b0ed2e3
commit 4d18329946

View file

@ -298,17 +298,17 @@ gamestate_t wipegamestate = GS_LEVEL;
INT16 wipetypepre = -1;
INT16 wipetypepost = -1;
static boolean D_Display(void)
static void D_Display(void)
{
boolean forcerefresh = false;
static boolean wipe = false;
INT32 wipedefindex = 0;
if (dedicated)
return false;
return;
if (nodrawers)
return false; // for comparative timing/profiling
return; // for comparative timing/profiling
// Lactozilla: Switching renderers works by checking
// if the game has to do it right when the frame
@ -682,10 +682,10 @@ static boolean D_Display(void)
M_DrawPerfStats();
}
return true; // Do I_FinishUpdate in the main loop
PS_START_TIMING(ps_swaptime);
I_FinishUpdate(); // page flip or blit buffer
PS_STOP_TIMING(ps_swaptime);
}
return false;
}
// =========================================================================
@ -703,7 +703,6 @@ void D_SRB2Loop(void)
boolean interp = false;
boolean doDisplay = false;
boolean screenUpdate = false;
if (dedicated)
server = true;
@ -793,7 +792,7 @@ void D_SRB2Loop(void)
#endif
interp = R_UsingFrameInterpolation() && !dedicated;
doDisplay = screenUpdate = false;
doDisplay = false;
#ifdef HW3SOUND
HW3S_BeginFrameUpdate();
@ -871,10 +870,16 @@ void D_SRB2Loop(void)
if (interp || doDisplay)
{
screenUpdate = D_Display();
D_Display();
}
// consoleplayer -> displayplayer (hear sounds from viewpoint)
// Only take screenshots after drawing.
if (moviemode)
M_SaveFrame();
if (takescreenshot)
M_DoScreenShot();
// consoleplayer -> displayplayers (hear sounds from viewpoint)
S_UpdateSounds(); // move positional sounds
S_UpdateClosedCaptions();
@ -884,21 +889,6 @@ void D_SRB2Loop(void)
LUA_Step();
// I_FinishUpdate is now here instead of D_Display,
// because it synchronizes it more closely with the frame counter.
if (screenUpdate == true)
{
PS_START_TIMING(ps_swaptime);
I_FinishUpdate(); // page flip or blit buffer
PS_STOP_TIMING(ps_swaptime);
}
// Only take screenshots after drawing.
if (moviemode)
M_SaveFrame();
if (takescreenshot)
M_DoScreenShot();
// Fully completed frame made.
finishprecise = I_GetPreciseTime();
if (!singletics)