mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 13:21:31 +00:00
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:
parent
f085fc5cbb
commit
cd6a68aea5
1 changed files with 12 additions and 22 deletions
34
src/d_main.c
34
src/d_main.c
|
@ -270,7 +270,7 @@ void D_ProcessEvents(void)
|
||||||
// added comment : there is a wipe eatch change of the gamestate
|
// added comment : there is a wipe eatch change of the gamestate
|
||||||
gamestate_t wipegamestate = GS_LEVEL;
|
gamestate_t wipegamestate = GS_LEVEL;
|
||||||
|
|
||||||
static boolean D_Display(void)
|
static void D_Display(void)
|
||||||
{
|
{
|
||||||
boolean forcerefresh = false;
|
boolean forcerefresh = false;
|
||||||
static boolean wipe = false;
|
static boolean wipe = false;
|
||||||
|
@ -280,7 +280,7 @@ static boolean D_Display(void)
|
||||||
if (!dedicated)
|
if (!dedicated)
|
||||||
{
|
{
|
||||||
if (nodrawers)
|
if (nodrawers)
|
||||||
return false; // for comparative timing/profiling
|
return; // for comparative timing/profiling
|
||||||
|
|
||||||
// check for change of screen size (video mode)
|
// check for change of screen size (video mode)
|
||||||
if (setmodeneeded && !wipe)
|
if (setmodeneeded && !wipe)
|
||||||
|
@ -345,7 +345,7 @@ static boolean D_Display(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dedicated) //bail out after wipe logic
|
if (dedicated) //bail out after wipe logic
|
||||||
return false;
|
return;
|
||||||
|
|
||||||
// do buffered drawing
|
// do buffered drawing
|
||||||
switch (gamestate)
|
switch (gamestate)
|
||||||
|
@ -613,10 +613,8 @@ static boolean D_Display(void)
|
||||||
if (cv_shittyscreen.value)
|
if (cv_shittyscreen.value)
|
||||||
V_DrawVhsEffect(cv_shittyscreen.value == 2);
|
V_DrawVhsEffect(cv_shittyscreen.value == 2);
|
||||||
|
|
||||||
return true; // Do I_FinishUpdate in the main loop
|
I_FinishUpdate(); // page flip or blit buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
@ -633,7 +631,6 @@ void D_SRB2Loop(void)
|
||||||
|
|
||||||
boolean interp = false;
|
boolean interp = false;
|
||||||
boolean doDisplay = false;
|
boolean doDisplay = false;
|
||||||
boolean screenUpdate = false;
|
|
||||||
|
|
||||||
if (dedicated)
|
if (dedicated)
|
||||||
server = true;
|
server = true;
|
||||||
|
@ -709,7 +706,7 @@ void D_SRB2Loop(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
interp = R_UsingFrameInterpolation() && !dedicated;
|
interp = R_UsingFrameInterpolation() && !dedicated;
|
||||||
doDisplay = screenUpdate = false;
|
doDisplay = false;
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
#ifdef HW3SOUND
|
||||||
HW3S_BeginFrameUpdate();
|
HW3S_BeginFrameUpdate();
|
||||||
|
@ -767,9 +764,15 @@ void D_SRB2Loop(void)
|
||||||
|
|
||||||
if (interp || doDisplay)
|
if (interp || doDisplay)
|
||||||
{
|
{
|
||||||
screenUpdate = D_Display();
|
D_Display();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only take screenshots after drawing.
|
||||||
|
if (moviemode)
|
||||||
|
M_SaveFrame();
|
||||||
|
if (takescreenshot)
|
||||||
|
M_DoScreenShot();
|
||||||
|
|
||||||
// consoleplayer -> displayplayers (hear sounds from viewpoint)
|
// consoleplayer -> displayplayers (hear sounds from viewpoint)
|
||||||
S_UpdateSounds(); // move positional sounds
|
S_UpdateSounds(); // move positional sounds
|
||||||
|
|
||||||
|
@ -791,19 +794,6 @@ void D_SRB2Loop(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// I_FinishUpdate is now here instead of D_Display,
|
|
||||||
// because it synchronizes it more closely with the frame counter.
|
|
||||||
if (screenUpdate == true)
|
|
||||||
{
|
|
||||||
I_FinishUpdate(); // page flip or blit buffer
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only take screenshots after drawing.
|
|
||||||
if (moviemode)
|
|
||||||
M_SaveFrame();
|
|
||||||
if (takescreenshot)
|
|
||||||
M_DoScreenShot();
|
|
||||||
|
|
||||||
// Fully completed frame made.
|
// Fully completed frame made.
|
||||||
finishprecise = I_GetPreciseTime();
|
finishprecise = I_GetPreciseTime();
|
||||||
if (!singletics)
|
if (!singletics)
|
||||||
|
|
Loading…
Reference in a new issue