eventloop: don't update logic FPS counter after LFRAME_SKIP_ALWAYS

This drastically reduces calls to time_get() when fast-forwarding (e.g.
quickload)
This commit is contained in:
Andrei Alexeyev 2022-01-12 14:22:06 +02:00
parent 5d339c09d8
commit 5a3027df26
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -64,7 +64,10 @@ LogicFrameAction run_logic_frame(LoopFrame *frame) {
}
LogicFrameAction a = frame->logic(frame->context);
fpscounter_update(&global.fps.logic);
if(a != LFRAME_SKIP_ALWAYS) {
fpscounter_update(&global.fps.logic);
}
if(taisei_quit_requested()) {
a = LFRAME_STOP;