diff options
author | David Thompson <dthompson@member.fsf.org> | 2013-08-15 18:59:14 -0400 |
---|---|---|
committer | David Thompson <dthompson@member.fsf.org> | 2013-08-15 18:59:14 -0400 |
commit | 8748076e491ac5500c7b05248c6ad1c14458b937 (patch) | |
tree | a2e9e4a450a03cb4ac64f47a12f413654831567c | |
parent | acc9e887c81677dc88ef793b3e27e7fac3a72ab7 (diff) |
Init SDL when window module is loaded instead of needing an explicit init call.
-rw-r--r-- | 2d/window.scm | 12 |
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)) |