summaryrefslogtreecommitdiff
path: root/honey
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2023-05-11 10:53:51 -0500
committersanine-a <sanine.not@pm.me>2023-05-11 10:53:51 -0500
commit997a16674dd88aa3ffc76e1d68b860278156689d (patch)
tree70f147f40a06602081b00acacef8e22d02bb9d30 /honey
parent14195dac1eda9140192ca07003258715b8b0abd3 (diff)
limit framerate to 60 fpsrdbms-ecs
Diffstat (limited to 'honey')
-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