diff options
Diffstat (limited to 'src/lua/embed/scripts')
-rw-r--r-- | src/lua/embed/scripts/boot.lua.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lua/embed/scripts/boot.lua.h b/src/lua/embed/scripts/boot.lua.h index cffeca6..af81c16 100644 --- a/src/lua/embed/scripts/boot.lua.h +++ b/src/lua/embed/scripts/boot.lua.h @@ -31,12 +31,13 @@ local function call(func, ...) end end +local step = jin.time.step +jin.time.step = nil + function jin.core.run() jin.graphics.reset() call(jin.core.onLoad) local dt = 0 - local previous = jin.time.second() - local current = previous while jin.core.running() do for _, e in pairs(jin.event.poll()) do if e.type == "KeyDown" then @@ -46,10 +47,9 @@ function jin.core.run() end call(jin.core.onEvent, e) end - previous = current - current = jin.time.second() - dt = current - previous - call(jin.core.onUpdate, dt) + step() + dt = jin.time.getDelta() + call(jin.core.onUpdate) jin.graphics.clear() call(jin.core.onDraw) jin.graphics.present() |