From 2019b4dfdbe0c3c04febec20512612cc179fb797 Mon Sep 17 00:00:00 2001 From: Winston Weinert Date: Sat, 7 Sep 2024 15:04:07 -0500 Subject: [PATCH] fix: help menu errors out Made the scene update hook optional. --- src/scene.fnl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scene.fnl b/src/scene.fnl index 2d2d706..30dbd27 100644 --- a/src/scene.fnl +++ b/src/scene.fnl @@ -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