Skip to content

Commit

Permalink
manually open audio when control key pressed
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoVan committed Jun 25, 2023
1 parent 9ad1ed1 commit 223abe2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion canvas.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ the value were set when running, leave this nil while def")
))

(defun on-keydown (key)
(when (c:keq key
:SCANCODE-RIGHT
:SCANCODE-K
:SCANCODE-L
:SCANCODE-LEFT
:SCANCODE-J
:SCANCODE-H
:SCANCODE-RETURN)
(c:open-audio-if-not-yet))
(cond
((c:keq key :SCANCODE-P)
(setf
Expand Down Expand Up @@ -191,7 +200,7 @@ the value were set when running, leave this nil while def")
(defun on-fingerup (&key x y dx dy pressure finger-id)
(declare (ignore y dx dy pressure finger-id))


(c:open-audio-if-not-yet)

(when (and (not *died*) (not *paused*) *started*)
(cond
Expand Down

0 comments on commit 223abe2

Please sign in to comment.