summaryrefslogtreecommitdiff
path: root/honey/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'honey/init.lua')
-rw-r--r--honey/init.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/honey/init.lua b/honey/init.lua
index d2f5279..887cf02 100644
--- a/honey/init.lua
+++ b/honey/init.lua
@@ -33,10 +33,12 @@ function loop(window, update)
while not window:shouldClose() do
local time = glfw.GetTime()
local dt = time - prevTime
- prevTime = time
- update(dt)
- window:swapBuffers()
- glfw.PollEvents()
+ if dt > 1/60 then
+ prevTime = time
+ update(dt)
+ window:swapBuffers()
+ glfw.PollEvents()
+ end
end
end