summaryrefslogtreecommitdiff
path: root/chickadee.scm
diff options
context:
space:
mode:
Diffstat (limited to 'chickadee.scm')
-rw-r--r--chickadee.scm20
1 files changed, 10 insertions, 10 deletions
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!")