summaryrefslogtreecommitdiff
path: root/sdl2/video.scm
diff options
context:
space:
mode:
Diffstat (limited to 'sdl2/video.scm')
-rw-r--r--sdl2/video.scm16
1 files changed, 7 insertions, 9 deletions
diff --git a/sdl2/video.scm b/sdl2/video.scm
index e4d6d6c..ab2ec0f 100644
--- a/sdl2/video.scm
+++ b/sdl2/video.scm
@@ -127,16 +127,14 @@ the form '(x y)', where each coordinate is measured in pixels."
"Close WINDOW."
(ffi:sdl-destroy-window (unwrap-window window)))
-(define (call-with-window args proc)
- "Call PROC with a new window defined by ARGS, a list of keyword
-arguments accepted by 'make-window', and close it when PROC
+(define (call-with-window window proc)
+ "Call PROC with WINDOW, an SDL window object, and close it when PROC
returns or otherwise exits."
- (let ((window (apply make-window args)))
- (dynamic-wind
- (const #t)
- (lambda () (proc window))
- (lambda ()
- (close-window! window)))))
+ (dynamic-wind
+ (const #t)
+ (lambda () (proc window))
+ (lambda ()
+ (close-window! window))))
(define (window-title window)
"Return the title for WINDOW."