Add FPS status to window titlebar
This commit is contained in:
@@ -244,6 +244,9 @@ void deinit(Game *game) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void render(float dt, 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;
|
Camera2D *camera = &game->camera;
|
||||||
|
|
||||||
ImGuiIO *io = igGetIO();
|
ImGuiIO *io = igGetIO();
|
||||||
|
|||||||
Reference in New Issue
Block a user