summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-12-14 08:34:14 -0500
committerDavid Thompson <dthompson2@worcester.edu>2018-12-14 08:34:14 -0500
commitf2f90e8992420c3c3dd0b3ffa5e17ced4e9a4589 (patch)
treea620730995671891efefa1d0fe85d2fea7f64973
parentcfea7a23bb19525eaa839673fd3f868dbfb13795 (diff)
Fix game controller stuff.
Forgot to prefix imported procedures since I define procedures with the same names.
-rw-r--r--chickadee.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/chickadee.scm b/chickadee.scm
index 9b225ba..478cf6c 100644
--- a/chickadee.scm
+++ b/chickadee.scm
@@ -24,7 +24,7 @@
(define-module (chickadee)
#:use-module (sdl2)
#:use-module (sdl2 events)
- #:use-module (sdl2 input game-controller)
+ #:use-module ((sdl2 input game-controller) #:prefix sdl2:)
#:use-module (sdl2 input joystick)
#:use-module ((sdl2 input keyboard) #:prefix sdl2:)
#:use-module ((sdl2 input mouse) #:prefix sdl2:)
@@ -80,10 +80,10 @@
(hashv-ref *controllers* joystick-id))
(define (add-controller joystick-index)
- (let ((controller (open-game-controller joystick-index)))
+ (let ((controller (sdl2:open-game-controller joystick-index)))
(hashv-set! *controllers*
(joystick-instance-id
- (game-controller-joystick controller))
+ (sdl2:game-controller-joystick controller))
controller)
controller))
@@ -93,7 +93,7 @@
(define (open-all-controllers)
(let loop ((i 0))
(when (< i (num-joysticks))
- (when (game-controller-index? i)
+ (when (sdl2:game-controller-index? i)
(add-controller i))
(loop (+ i 1)))))
@@ -192,7 +192,7 @@ not being pushed at all."
(controller-device-event-which event))))
(controller-remove controller)
(remove-controller (controller-device-event-which event))
- (close-game-controller controller)))
+ (sdl2:close-game-controller controller)))
((controller-button-down-event? event)
(controller-press (lookup-controller
(controller-button-event-which event))