Fixed compiling
Some checks failed
Build Dusk / run-tests (push) Failing after 15s

This commit is contained in:
2026-03-10 21:11:12 -05:00
parent 58c239f4b4
commit 4517b63557
5 changed files with 31 additions and 23 deletions

View File

@@ -33,6 +33,8 @@ void timeUpdate(void) {
TIME.dynamicTime += TIME.dynamicDelta;
TIME.dynamicUpdate = true;
printf("Time delta: %f\n", TIME.dynamicDelta);
assertTrue(TIME.dynamicDelta >= 0.0f, "Time delta is negative");
// Is within 1ms of a full step?

View File

@@ -6,6 +6,7 @@
*/
#include "timesdl2.h"
#include "assert/assert.h"
void timeTickSDL2(void) {
TIME_TICKS_LAST_SDL2 = TIME_TICKS_SDL2;
@@ -13,5 +14,6 @@ void timeTickSDL2(void) {
}
float_t timeGetDeltaSDL2(void) {
assertTrue(TIME_TICKS_SDL2 >= TIME_TICKS_LAST_SDL2, "Ticks went backwards?");
return (float_t)(TIME_TICKS_SDL2 - TIME_TICKS_LAST_SDL2) / 1000.0f;
}