summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2019-05-24 07:46:46 -0400
committerDavid Thompson <dthompson@vistahigherlearning.com>2019-05-24 07:46:46 -0400
commita23f1d2d8370b6fe4fcaed005b5f56d5f1fb073b (patch)
tree5a40b2a34fa14f0a2597d75345d3a8a28492b225
parent8f203643b8f8bd9770ab2494d474896ab56f8463 (diff)
kernel: Use global dev mode flag.
-rw-r--r--starling/kernel.scm9
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)