summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 218321ef25..e292a20982 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1525,11 +1525,15 @@ static uint64_t idle_process_max = 0;
bool Main::iteration() {
uint64_t ticks = OS::get_singleton()->get_ticks_usec();
+ Engine::get_singleton()->_frame_ticks = ticks;
+
uint64_t ticks_elapsed = ticks - last_ticks;
double step = (double)ticks_elapsed / 1000000.0;
float frame_slice = 1.0 / Engine::get_singleton()->get_iterations_per_second();
+ Engine::get_singleton()->_frame_step = step;
+
/*
if (time_accum+step < frame_slice)
return false;