Add FPS status to window titlebar

This commit is contained in:
2023-11-11 09:25:22 +01:00
parent 3c8254c6f6
commit afb8e93f15

View File

@@ -244,6 +244,9 @@ void deinit(Game *game) {
}
void render(float dt, Game *game) {
char titleBuf[32];
snprintf(titleBuf, sizeof(titleBuf), "FPS: %d | %.2f ms", GetFPS(), GetFrameTime() * 1000);
SetWindowTitle(titleBuf);
Camera2D *camera = &game->camera;
ImGuiIO *io = igGetIO();