diff options
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; |