fix timing demo (#720)

This commit is contained in:
Roman Fomin 2022-09-07 13:09:53 +07:00 committed by GitHub
parent 052275aedd
commit bc21a66ef9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3783,6 +3783,16 @@ boolean G_CheckDemoStatus(void)
ticcmd_t* cmd = last_cmd; ticcmd_t* cmd = last_cmd;
last_cmd = NULL; last_cmd = NULL;
if (timingdemo)
{
int endtime = I_GetTime_RealTime();
// killough -- added fps information and made it work for longer demos:
unsigned realtics = endtime-starttime;
I_Error ("Timed %u gametics in %u realtics = %-.1f frames per second",
(unsigned) gametic,realtics,
(unsigned) gametic * (double) TICRATE / realtics);
}
if (demoplayback) if (demoplayback)
{ {
if (demorecording) if (demorecording)
@ -3848,16 +3858,6 @@ boolean G_CheckDemoStatus(void)
return false; // killough return false; // killough
} }
if (timingdemo)
{
int endtime = I_GetTime_RealTime();
// killough -- added fps information and made it work for longer demos:
unsigned realtics = endtime-starttime;
I_Error ("Timed %u gametics in %u realtics = %-.1f frames per second",
(unsigned) gametic,realtics,
(unsigned) gametic * (double) TICRATE / realtics);
}
return false; return false;
} }