summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2013-08-15 18:59:14 -0400
committerDavid Thompson <dthompson@member.fsf.org>2013-08-15 18:59:14 -0400
commit8748076e491ac5500c7b05248c6ad1c14458b937 (patch)
treea2e9e4a450a03cb4ac64f47a12f413654831567c
parentacc9e887c81677dc88ef793b3e27e7fac3a72ab7 (diff)
Init SDL when window module is loaded instead of needing an explicit init call.
-rw-r--r--2d/window.scm12
1 files changed, 4 insertions, 8 deletions
diff --git a/2d/window.scm b/2d/window.scm
index 334e709..9c863f6 100644
--- a/2d/window.scm
+++ b/2d/window.scm
@@ -24,18 +24,14 @@
(define-module (2d window)
#:use-module (figl gl)
#:use-module ((sdl sdl) #:prefix SDL:)
- #:export (init-2d
- open-window
+ #:export (open-window
close-window
window-title
set-window-title!))
-(define (init-2d)
- "Initializes guile-2d. This procedure must be called before using
-the rest of the framework."
- (SDL:init 'everything)
- ;; Enable unicode key events
- (SDL:enable-unicode #t))
+;; Initialize everything
+(SDL:enable-unicode #t)
+(SDL:init 'everything)
(define* (open-window width height #:optional #:key
(depth 24) (title "guile-2d") (resizable #f))