no longer zeroing _delta_time if nanosecond element of difference between last and next time is negative

pull/8/head
Sara 2023-06-18 19:04:22 +02:00
parent a49ac0db93
commit b30df338ac
1 changed files with 0 additions and 1 deletions

View File

@ -75,7 +75,6 @@ int _engine_run() {
while(g_context.running) { while(g_context.running) {
timespec_get(&next_time, TIME_UTC); timespec_get(&next_time, TIME_UTC);
_delta_time = timespec_to_sec(next_time) - timespec_to_sec(start_last_frame); _delta_time = timespec_to_sec(next_time) - timespec_to_sec(start_last_frame);
if(next_time.tv_nsec < start_last_frame.tv_nsec) _delta_time = 0;
start_last_frame = next_time; start_last_frame = next_time;
_handle_events(); _handle_events();
update_input(); update_input();