diff options
-rw-r--r-- | starling/kernel.scm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/starling/kernel.scm b/starling/kernel.scm index 7957a51..25fb8a0 100644 --- a/starling/kernel.scm +++ b/starling/kernel.scm @@ -37,6 +37,7 @@ #:use-module (sdl2 mixer) #:use-module (sdl2 video) #:use-module (starling asset) + #:use-module (starling config) #:use-module (starling node) #:use-module (starling repl) #:use-module (starling scene) @@ -74,8 +75,6 @@ #:init-keyword #:window-config) (update-hz #:accessor update-hz #:init-form 60 #:init-keyword #:update-hz) - (developer-mode? #:getter developer-mode? #:init-form #t - #:init-keyword #:developer-mode?) (window #:accessor window) (gl-context #:accessor gl-context) (default-viewport #:accessor default-viewport) @@ -108,7 +107,7 @@ (loop (+ i 1))))) (define-method (on-boot (kernel <kernel>)) - (when (developer-mode? kernel) + (when developer-mode? ;; Enable live asset reloading. (watch-assets #t) ;; Start REPL server. @@ -204,7 +203,7 @@ (next-method)) (define-method (update (kernel <kernel>) dt) - (when (developer-mode? kernel) + (when developer-mode? (reload-modified-assets)) ;; Free any GPU resources that have been GC'd. (gpu-reap!)) @@ -224,7 +223,7 @@ (* (avg-frame-time kernel) 0.9))))) (define-method (on-error (kernel <kernel>) stack key args) - (if (developer-mode? kernel) + (if developer-mode? (let ((title (window-title (window kernel)))) (set-window-title! (window kernel) (string-append "[ERROR] " title)) (on-error (& kernel repl) stack key args) |