summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/chickadee.scm b/chickadee.scm
index bffb83c..9956b16 100644
--- a/chickadee.scm
+++ b/chickadee.scm
@@ -386,6 +386,11 @@ border is disabled, otherwise it is enabled.")
(with-projection (atomic-box-ref default-projection)
(draw alpha)))
(sdl2:swap-gl-window (unwrap-window window)))
+ (define (on-error stack key args)
+ (error stack key args)
+ ;; Flush all input events that have occurred while in the error
+ ;; state.
+ (while (poll-event) #t))
(dynamic-wind
(const #t)
(lambda ()
@@ -408,7 +413,7 @@ border is disabled, otherwise it is enabled.")
(scope-datadir "gamecontrollerdb.txt"))
(run-game* #:update update-sdl
#:render render-sdl-opengl
- #:error error
+ #:error on-error
#:time elapsed-time
#:update-hz update-hz)))
(lambda ()