From 8748076e491ac5500c7b05248c6ad1c14458b937 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 15 Aug 2013 18:59:14 -0400 Subject: Init SDL when window module is loaded instead of needing an explicit init call. --- 2d/window.scm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to '2d/window.scm') 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)) -- cgit v1.2.3