Fix action registration

This commit is contained in:
BirDt_ 2026-04-17 22:38:59 +08:00
parent 5f95f1f527
commit da164ae3c4

View file

@ -371,7 +371,7 @@
(assert (symbol? name)) (assert (symbol? name))
(assert (member type '(key-press))) (assert (member type '(key-press)))
(set! input-actions (set! input-actions
(cons (list name (cons (cons name
(apply (cond (apply (cond
((eqv? type 'key-press) make-key-press)) ((eqv? type 'key-press) make-key-press))
data)) data))
@ -389,9 +389,10 @@
(lambda (action) (lambda (action)
(cond (cond
((key-press? (cdr action)) ((key-press? (cdr action))
(when (key-pressed? (key-press-key (cdr action)))
(push-event 'input (push-event 'input
(car action) (car action)
(cdr action))))) (cdr action))))))
input-actions)))) input-actions))))
;; Render queue exports ;; Render queue exports