fix: replaced 1.0 with GetFrameTime when calling SceneTick

This commit is contained in:
Sara 2024-09-19 11:34:26 +02:00
parent bfa75d1744
commit 10bd6ae727

View file

@ -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();