diff options
author | David Thompson <davet@gnu.org> | 2019-05-07 16:37:59 -0400 |
---|---|---|
committer | David Thompson <davet@gnu.org> | 2019-05-07 16:37:59 -0400 |
commit | 38d4745df23fa81448e8b3bdcb3416ecab6b4891 (patch) | |
tree | 9c9179702689bdb43537e993a96bb5e9562d569a | |
parent | da9c4c5aaadc450b921108aa4d38ebd8d8b5e4e6 (diff) |
kernel: Use thunk to create initial scene after kernel init.
-rw-r--r-- | starling/kernel.scm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/starling/kernel.scm b/starling/kernel.scm index da82b8d..9fa9ac8 100644 --- a/starling/kernel.scm +++ b/starling/kernel.scm @@ -245,7 +245,7 @@ (define-method (fps kernel) (/ 1000.0 (avg-frame-time kernel))) -(define-method (boot-kernel (kernel <kernel>) (scene <scene>)) +(define-method (boot-kernel (kernel <kernel>) thunk) (sdl-init) ;; This will throw an error if any audio subsystem is unavailable, ;; but not every audio subsystem is needed so don't crash the @@ -277,7 +277,7 @@ (const #t) (lambda () (parameterize ((current-kernel kernel)) - (push-scene scene) + (push-scene (thunk)) (activate kernel) (run-game* #:update (lambda (dt) (update* kernel dt)) #:render (lambda (alpha) (render* kernel alpha)) |