diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-06-28 16:20:18 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-08-25 19:33:07 -0400 |
commit | 4313b5e68ab730b002e5c59af407b3835b2813ce (patch) | |
tree | 6d90de24a343becb16aec714487877a8ae08263a | |
parent | c1cf48cff05417f06df83c96e15b4b0019620b94 (diff) |
Deference one signal instead of two.
* 2d/game.scm (draw): Use window-size instead of window-width and
window-height.
-rw-r--r-- | sly/game.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sly/game.scm b/sly/game.scm index 888d10d..ddfdd45 100644 --- a/sly/game.scm +++ b/sly/game.scm @@ -30,6 +30,7 @@ #:use-module (sly event) #:use-module (sly math) #:use-module (sly signal) + #:use-module (sly vector) #:use-module (sly window) #:export (draw-hook after-game-loop-error-hook @@ -72,9 +73,8 @@ becoming completely unresponsive and possibly crashing." (frame-interval (interval frame-rate))) (define (draw dt alpha) "Render a frame." - (let ((width (signal-ref window-width)) - (height (signal-ref window-height))) - (gl-viewport 0 0 width height)) + (let ((size (signal-ref window-size))) + (gl-viewport 0 0 (vx size) (vy size))) (gl-clear (clear-buffer-mask color-buffer depth-buffer)) (run-hook draw-hook dt alpha) (SDL:gl-swap-buffers)) |