summaryrefslogtreecommitdiff
path: root/sly/game.scm
diff options
context:
space:
mode:
Diffstat (limited to 'sly/game.scm')
-rw-r--r--sly/game.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/sly/game.scm b/sly/game.scm
index ef92e90..b114ada 100644
--- a/sly/game.scm
+++ b/sly/game.scm
@@ -151,6 +151,11 @@ milliseconds of the last iteration of the game loop."
(call-with-prompt
'game-loop-prompt
(lambda ()
+ ;; Catch SIGINT and kill the loop.
+ (sigaction SIGINT
+ (lambda (signum)
+ (stop-game-loop)))
+ ;; Let's play!
(game-loop (SDL:get-ticks) 0))
(lambda (cont callback)
(when (procedure? callback)