Skip to content

Commit

Permalink
fix: help menu errors out
Browse files Browse the repository at this point in the history
Made the scene update hook optional.
  • Loading branch information
winny- committed Sep 7, 2024
1 parent 65513bb commit 2019b4d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/scene.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@
(bind-love-mouse :mousepressed)
(bind-love-mouse :mousereleased)

(fn love.update [dt]
(fns.update state (math.min dt (/ 1 min-framerate))))
(set love.update
(match fns.update
(where callback) (fn [dt]
(callback state (math.min dt (/ 1 min-framerate))))
_ (fn [dt] nil)))

(fn love.draw []
;; center the screen and preserve aspect
Expand Down

0 comments on commit 2019b4d

Please sign in to comment.