From 5e5b0cd174126e8b183466932892926e6b068ed2 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 5 Dec 2020 15:47:42 -0500 Subject: Update to new guile-sdl2 API. --- chickadee.scm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'chickadee.scm') diff --git a/chickadee.scm b/chickadee.scm index 2c65226..e00b2b1 100644 --- a/chickadee.scm +++ b/chickadee.scm @@ -213,31 +213,31 @@ border is disabled, otherwise it is enabled.") (define (window-width window) "Return the width of WINDOW." - (match (sdl2:window-size (unwrap-window window)) - ((x _) x))) + (call-with-values (lambda () (sdl2:window-size (unwrap-window window))) + (lambda (w h) w))) (define (window-height window) "Return the height of WINDOW." - (match (sdl2:window-size (unwrap-window window)) - ((_ y) y))) + (call-with-values (lambda () (sdl2:window-size (unwrap-window window))) + (lambda (w h) h))) (define (window-x window) "Return the X coordinate of the upper-left corner of WINDOW." - (match (sdl2:window-position (unwrap-window window)) - ((x _) x))) + (call-with-values (lambda () (sdl2:window-position (unwrap-window window))) + (lambda (x y) x))) (define (window-y window) "Return the Y coordinate of the upper-left corner of WINDOW." - (match (sdl2:window-position (unwrap-window window)) - ((_ y) y))) + (call-with-values (lambda () (sdl2:window-position (unwrap-window window))) + (lambda (x y) y))) (define (set-window-size! window width height) "Change the dimensions of WINDOW to WIDTH x HEIGHT pixels." - (sdl2:set-window-size! (unwrap-window window) (list width height))) + (sdl2:set-window-size! (unwrap-window window) width height)) (define (set-window-position! window x y) "Move the upper-left corner of WINDOW to pixel coordinates (X, Y)." - (sdl2:set-window-position! (unwrap-window window) (list x y))) + (sdl2:set-window-position! (unwrap-window window) x y)) (define* (run-game #:key (window-title "Chickadee!") -- cgit v1.2.3