summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Prikler <leo.prikler@student.tugraz.at>2020-09-29 10:45:07 +0200
committerDavid Thompson <dthompson2@worcester.edu>2020-09-29 13:13:04 -0400
commit5654ee59b26d0718b99e149da7f7325418186597 (patch)
treebf6ef89fce2814252b9df9d35889ac5d8c67e22f
parent1b7cdecf240859baa497f10215f3ebf72ec46963 (diff)
render: Allow rect to be #f in render-draw-rect and render-draw-rects.
-rw-r--r--sdl2/render.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/sdl2/render.scm b/sdl2/render.scm
index d48d938..f937eca 100644
--- a/sdl2/render.scm
+++ b/sdl2/render.scm
@@ -167,7 +167,9 @@ color."
"Draw RECT on RENDERER."
(ffi:sdl-render-draw-rect
(unwrap-renderer renderer)
- ((@@ (sdl2 rect) unwrap-rect) rect)))
+ (if rect
+ ((@@ (sdl2 rect) unwrap-rect) rect)
+ %null-pointer)))
(define (render-draw-rects renderer rects)
"Draw RECTS on RENDERER."
@@ -185,7 +187,9 @@ color."
"Fill RECT on RENDERER."
(ffi:sdl-render-fill-rect
(unwrap-renderer renderer)
- ((@@ (sdl2 rect) unwrap-rect) rect)))
+ (if rect
+ ((@@ (sdl2 rect) unwrap-rect) rect)
+ %null-pointer)))
(define (render-fill-rects renderer rects)
"Fill RECTS on RENDERER."