From 49f93e5fe7261dd520a0013508fd02086af6ae17 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 3 Nov 2013 20:02:44 -0500 Subject: Pass scene state to all observer event handlers. --- 2d/game-loop.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '2d/game-loop.scm') diff --git a/2d/game-loop.scm b/2d/game-loop.scm index a6cd669..a14459e 100644 --- a/2d/game-loop.scm +++ b/2d/game-loop.scm @@ -130,10 +130,11 @@ time in milliseconds that has passed since the last game update." ;; By default, pressing the escape key will pop the current scene, and ;; closing the window will quit the game. -(default-events `((key-down . ,(lambda (key mod unicode) +(default-events `((key-down . ,(lambda (state key mod unicode) (when (eq? key 'escape) (pop-scene)))) - (quit . ,quit-game))) + (quit . ,(lambda (state) + (quit-game))))) (define handle-events (let ((e (SDL:make-event))) -- cgit v1.2.3