summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/chickadee.scm b/chickadee.scm
index 876c59e..4edeb03 100644
--- a/chickadee.scm
+++ b/chickadee.scm
@@ -63,6 +63,7 @@
set-window-position!
set-window-fullscreen!
controller-button-pressed?
+ controller-button-released?
controller-axis
controller-name
key-pressed?
@@ -118,6 +119,10 @@
"Return #t if BUTTON is currently being pressed on CONTROLLER."
(sdl2:game-controller-button-pressed? controller button))
+(define (controller-button-released? controller button)
+ "Return #t if BUTTON is not currently being pressed on CONTROLLER."
+ (not (controller-button-pressed? controller button)))
+
(define (controller-axis controller axis)
"Return a floating point value in the range [-1, 1] corresponding to
how much AXIS is being pushed on CONTROLLER. 0 is returned if AXIS is