Move screenshot code before timing

This commit is contained in:
Sally Coolatta 2022-05-04 20:17:35 -04:00
parent 8149a51192
commit f085fc5cbb

View file

@ -798,6 +798,12 @@ void D_SRB2Loop(void)
I_FinishUpdate(); // page flip or blit buffer 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)
@ -812,12 +818,6 @@ void D_SRB2Loop(void)
finishprecise = I_GetPreciseTime(); finishprecise = I_GetPreciseTime();
deltasecs = (double)((INT64)(finishprecise - enterprecise)) / I_GetPrecisePrecision(); deltasecs = (double)((INT64)(finishprecise - enterprecise)) / I_GetPrecisePrecision();
deltatics = deltasecs * NEWTICRATE; deltatics = deltasecs * NEWTICRATE;
// Only take screenshots after drawing.
if (moviemode)
M_SaveFrame();
if (takescreenshot)
M_DoScreenShot();
} }
} }