From bbecfee3b69fd2d2015305f3d04c02f87d4924b0 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 2 Sep 2018 10:37:13 +0800 Subject: *update --- src/lua/modules/embed/boot.lua.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lua/modules/embed/boot.lua.h') diff --git a/src/lua/modules/embed/boot.lua.h b/src/lua/modules/embed/boot.lua.h index cc71102..1638cbd 100644 --- a/src/lua/modules/embed/boot.lua.h +++ b/src/lua/modules/embed/boot.lua.h @@ -42,7 +42,6 @@ function jin.core.run() local dt = 0 local previous = jin.time.second() local current = previous - local SECOND_PER_FRAME = 1/jin.config.fps while jin.core.running() do for _, e in pairs(jin.event.poll()) do if e.type == "keydown" then @@ -56,10 +55,11 @@ function jin.core.run() current = jin.time.second() dt = current - previous call(jin.core.onUpdate, dt) - call(jin.graphics.clear) + jin.graphics.clear() call(jin.core.onDraw) - call(jin.graphics.present) - call(jin.time.sleep, 0.001) + jin.graphics.present() + -- sleep 1 ms + jin.time.sleep(0.001) end end -- cgit v1.1-26-g67d0