It never incremented if sleep was called, and could have eventually
become negative.
Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
sleeptime = Host_Frame(time);
oldtime = newtime;
+ ++host.framecount;
if (sleeptime >= 1)
- {
Host_Sleep(sleeptime);
- continue;
- }
-
- host.framecount++;
}
return;
{
jmp_buf abortframe;
int state;
- int framecount; // incremented every frame, never reset (checked by Host_Error and Host_SaveConfig_f)
+ unsigned int framecount; // incremented every frame, never reset (checked by Host_Error and Host_SaveConfig_f)
double realtime; // the accumulated mainloop time since application started (with filtering), without any slowmo or clamping
double dirtytime; // the main loop wall time for this frame, equal to Sys_DirtyTime() at the start of this host frame
double sleeptime; // time spent sleeping overall