From 10bd6ae727e3f4c96e4827cffaaa98e8919c3f40 Mon Sep 17 00:00:00 2001 From: Sara Date: Thu, 19 Sep 2024 11:34:26 +0200 Subject: [PATCH] fix: replaced 1.0 with GetFrameTime when calling SceneTick --- src/core/engine_loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/engine_loop.c b/src/core/engine_loop.c index 78c6046..bdecb30 100644 --- a/src/core/engine_loop.c +++ b/src/core/engine_loop.c @@ -14,6 +14,7 @@ void InitializeRaylibContext() { InitWindow(1280, 800, "FOGD Engine"); if(!IsWindowFullscreen()) ToggleFullscreen(); + SetTargetFPS(120); } void RunGame(Scene *initial_scene) { @@ -22,7 +23,7 @@ void RunGame(Scene *initial_scene) { ASSERT_RETURN(GetMainScene() != NULL,, "RunGame: Initial scene cannot be NULL."); // Main update loop while (!WindowShouldClose()) { - SceneTick(GetMainScene(), 1.0); + SceneTick(GetMainScene(), GetFrameTime()); RenderNextFrame(); } ShutDown();