From 7e2a8ddc7753b2c93d36e94090cc74145b860f01 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 6 Jan 2019 00:06:34 -0500 Subject: 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. --- chickadee.scm | 8 -------- 1 file changed, 8 deletions(-) (limited to 'chickadee.scm') 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) -- cgit v1.2.3