SDL_GameControllerDB/README.md

33 lines
982 B
Markdown
Raw Normal View History

2013-11-27 17:20:34 -03:00
##SDL_GameControllerDB
2016-07-29 10:46:24 -03:00
[![Build Status](https://travis-ci.org/gabomdq/SDL_GameControllerDB.svg?branch=master)](https://travis-ci.org/gabomdq/SDL_GameControllerDB)
2013-11-27 17:20:34 -03:00
2014-01-10 15:15:57 -03:00
A community source database of game controller mappings to be used with SDL2 Game Controller functionality.
2013-11-27 17:20:34 -03:00
####Usage:
Download gamecontrollerdb.txt, place it in your app's directory and load with:
```
SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt");
```
####Creating new mappings:
To create new mappings, you can use the controllermap utility provided with
SDL2, or using Steam's Big Picture mode, configure your joystick and then
look in config/config.vdf in your Steam installation directory for the
SDL_GamepadBind entry.
2013-11-27 17:20:34 -03:00
####Checking your mappings:
You need to have python3 installed. Run
```
python3 check.py gamecontrollerdb.txt
```
2013-11-27 17:20:34 -03:00
####References:
* [SDL2](http://www.libsdl.org)
* [SDL_GameControllerAddMappingsFromFile](http://wiki.libsdl.org/SDL_GameControllerAddMappingsFromFile)