summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2016-02-05 13:47:58 -0500
committerDavid Thompson <dthompson2@worcester.edu>2016-02-05 13:47:58 -0500
commitfa1b1d800cd29c2f61d427a041a3b99bead15960 (patch)
tree144704253bffa5fe1b7a3bfad8f2fd2b3b928b81
parent413df8e36458a2e3b76712c459ccb85d4bffdb10 (diff)
window: Initialize SDL window before opening.
* sly/window.scm (open-window): Initialize SDL2 and the window before modifying it.
-rw-r--r--sly/window.scm2
1 files changed, 2 insertions, 0 deletions
diff --git a/sly/window.scm b/sly/window.scm
index 739bb71..25b90fc 100644
--- a/sly/window.scm
+++ b/sly/window.scm
@@ -101,6 +101,8 @@
(sdl2:set-gl-swap-interval! 'vsync))
(define (open-window window)
+ (sdl2:sdl-init)
+ (init-window)
(let ((res (window-resolution window)))
(sdl2:set-window-title! %sdl-window (window-title window))
(sdl2:set-window-size! %sdl-window (list (vx res) (vy res)))