aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/embed
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-09-02 10:37:13 +0800
committerchai <chaifix@163.com>2018-09-02 10:37:13 +0800
commitbbecfee3b69fd2d2015305f3d04c02f87d4924b0 (patch)
tree00cfdb8302aeca9c8e5a4efe782a10e46c91afd8 /src/lua/modules/embed
parent3bb587f0d7c471a70683fa7d26939d21968dea98 (diff)
*update
Diffstat (limited to 'src/lua/modules/embed')
-rw-r--r--src/lua/modules/embed/boot.lua.h8
1 files changed, 4 insertions, 4 deletions
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