summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/graphics/engine.scm12
1 files changed, 5 insertions, 7 deletions
diff --git a/chickadee/graphics/engine.scm b/chickadee/graphics/engine.scm
index 804e705..e5b2d4d 100644
--- a/chickadee/graphics/engine.scm
+++ b/chickadee/graphics/engine.scm
@@ -310,13 +310,11 @@
(loop (guardian))))))
(define-syntax-rule (with-graphics-state ((spec value) ...) body ...)
- (dynamic-wind
- (lambda ()
- (graphics-engine-state-push! spec value) ...)
- (lambda ()
- body ...)
- (lambda ()
- (graphics-engine-state-pop! spec) ...)))
+ (begin
+ (graphics-engine-state-push! spec value) ...
+ (let ((result (begin body ...)))
+ (graphics-engine-state-pop! spec) ...
+ result) ))
(define-syntax-rule (with-graphics-state! ((spec value) ...) body ...)
(with-graphics-state ((spec value) ...)