diff options
author | David Thompson <dthompson2@worcester.edu> | 2019-01-06 00:06:34 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2019-01-06 00:06:34 -0500 |
commit | 7e2a8ddc7753b2c93d36e94090cc74145b860f01 (patch) | |
tree | 5e7126b94eaab27565a6a2c5d45f2c4392a72c7e | |
parent | a969c1059b636a8f8807c621c35d1382259367f1 (diff) |
Remove redundant open-all-controllers procedure.
I thought this was necessary to process controllers that were already
connected to the computer before a Chickadee-using program was
launched, but that doesn't seem to be the case.
* chickadee.scm (open-all-controllers): Delete.
(run-game): Remove call to open-all-controllers.
-rw-r--r-- | chickadee.scm | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/chickadee.scm b/chickadee.scm index 0b46237..7adb4b5 100644 --- a/chickadee.scm +++ b/chickadee.scm @@ -92,13 +92,6 @@ (define (remove-controller joystick-id) (hashv-remove! *controllers* joystick-id)) -(define (open-all-controllers) - (let loop ((i 0)) - (when (< i (num-joysticks)) - (when (sdl2:game-controller-index? i) - (add-controller i)) - (loop (+ i 1))))) - (define (controller-button-pressed? controller button) "Return #t if BUTTON is currently being pressed on CONTROLLER." (sdl2:game-controller-button-pressed? controller button)) @@ -145,7 +138,6 @@ not being pushed at all." (false-if-exception (mixer-init)) (open-audio) (start-text-input) - (open-all-controllers) (let* ((window (make-window #:opengl? #t #:title window-title #:size (list window-width window-height) |