diff options
author | chai <chaifix@163.com> | 2018-09-02 10:37:13 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-09-02 10:37:13 +0800 |
commit | bbecfee3b69fd2d2015305f3d04c02f87d4924b0 (patch) | |
tree | 00cfdb8302aeca9c8e5a4efe782a10e46c91afd8 /src/lua | |
parent | 3bb587f0d7c471a70683fa7d26939d21968dea98 (diff) |
*update
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/modules/embed/boot.lua.h | 8 | ||||
-rw-r--r-- | src/lua/modules/graphics/graphics.cpp | 1 |
2 files changed, 4 insertions, 5 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 diff --git a/src/lua/modules/graphics/graphics.cpp b/src/lua/modules/graphics/graphics.cpp index 92168ad..cd79211 100644 --- a/src/lua/modules/graphics/graphics.cpp +++ b/src/lua/modules/graphics/graphics.cpp @@ -173,7 +173,6 @@ namespace lua } else { - /* wrong type */ luax_typerror(L, 1, "texture or canvas"); } return 0; |