]> git.jsancho.org Git - gacela.git/blobdiff - gacela/game.scm
Store all events when lag is produced
[gacela.git] / gacela / game.scm
index 48bf1297b2fce045905db6d40030fa10165fe81e..fe5f0b3a1cfdc993d413ee9371f29c02b04a7fc0 100644 (file)
@@ -76,12 +76,13 @@ unused accumulator time."
               lag)
              ((>= lag tick-interval)
               (process-events)
-              (if (and (quit?) (procedure? when-quit))
+              (if (and (quit-event?) (procedure? when-quit))
                   (when-quit))
                                        ;(agenda-tick!)
               (iter (- lag tick-interval) (1+ ticks)))
              (else
               lag)))
+      (clear-events)
       (iter lag 0))
 
     (define (alpha lag)