From d78acacb7c34507b9be0454690fd09ed3a3f1647 Mon Sep 17 00:00:00 2001 From: "Winston (Winny) Weinert" Date: Thu, 12 Sep 2024 17:05:09 -0500 Subject: [PATCH] fix: help menu errors out (#73) 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