[client] app: correct FPS to use an actual per second value

This commit is contained in:
Geoffrey McRae
2021-07-19 10:58:40 +10:00
parent 2736e37e4a
commit 33bf668697
3 changed files with 44 additions and 25 deletions

View File

@@ -691,12 +691,9 @@ bool app_renderImGui(void)
ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoTitleBar
);
const float fps = 1000.0f / (g_state.renderTimeTotal /
ringbuffer_getCount(g_state.renderTimings));
const float ups = 1000.0f / (g_state.frameTimeTotal /
ringbuffer_getCount(g_state.frameTimings));
igText("FPS:%4.2f UPS:%4.2f", fps, ups);
igText("FPS:%4.2f UPS:%4.2f",
atomic_load_explicit(&g_state.fps, memory_order_relaxed),
atomic_load_explicit(&g_state.ups, memory_order_relaxed));
igEnd();
}