From 8350f7b806d612584be1ff56610ef51202965777 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 8 Jan 2019 21:13:36 -0500 Subject: Add SDL2 game controller database file. This will allow for lots of controllers to be automatically mapped correctly without the user having to do anything. * data/gamecontrollerdb.txt: New file. * Makefile.am (dist_pkgdata_DATA): Add it. * chickadee.scm (run-game): Load game controller db file. --- chickadee.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'chickadee.scm') diff --git a/chickadee.scm b/chickadee.scm index 7adb4b5..fe41f59 100644 --- a/chickadee.scm +++ b/chickadee.scm @@ -31,6 +31,7 @@ #:use-module (sdl2 input text) #:use-module (sdl2 mixer) #:use-module (sdl2 video) + #:use-module (chickadee config) #:use-module (chickadee game-loop) #:use-module (chickadee math matrix) #:use-module (chickadee render) @@ -238,6 +239,8 @@ not being pushed at all." (display "warning: could not enable vsync\n" (current-error-port)))) (load) + (sdl2:load-game-controller-mappings! + (scope-datadir "gamecontrollerdb.txt")) ;; Notify about all controllers that were already connected ;; when the game was launched because SDL will not create ;; events for them. -- cgit v1.2.3