From ab18f92fe5cbad804ca940613a52f63d3702210a Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 5 Nov 2023 02:22:07 +0000 Subject: [PATCH] Fix bug with calculating delta in release build --- src/GameEngine.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/GameEngine.c b/src/GameEngine.c index 2deb8ae..d1ffea7 100644 --- a/src/GameEngine.c +++ b/src/GameEngine.c @@ -139,9 +139,6 @@ bool init_engine(const char *game_name, WindowSize window_size, #if DEBUG_ENGINE GameEngine.delta = 1.0f / 60.0f; -#endif /* DEBUG_ENGINE */ - -#if DEBUG_ENGINE printf("Game initialised successfully\n"); #endif /* DEBUG_ENGINE */ @@ -825,7 +822,7 @@ void update() { u64 current_time = SDL_GetTicks64(); -#ifndef DEBUG_ENGINE +#if !DEBUG_ENGINE // Get the delta time in seconds since the SDL_GetTicks64() returns the // time in milliseconds GameEngine.delta = (current_time - GameEngine.last_time) / 1000.0f;