Fix bug with calculating delta in release build
This commit is contained in:
1 parent
8f141e4c67
commit
ab18f92fe5
1 file changed
+1
-4
+1
-4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user