SDL_GameControllerDB is a community-maintained database of game controller mappings designed to be used with the SDL (Simple DirectMedia Layer) library’s Game Controller API for both SDL2 and SDL3. Because many controllers report different axes and button layouts depending on platform and manufacturer, this project provides a large text database (gamecontrollerdb.txt) that maps those raw inputs to a standardized layout for consistent use in games and applications across Windows, macOS, Linux, Android, and other SDL-supported systems. Developers simply include or load the database file at runtime and call SDL’s API to add mappings, which enables out-of-the-box support for controllers that would otherwise behave unpredictably. The repository encourages community contributions so new or uncommon controllers can be added as they’re discovered and tested.
Features
- Community-sourced controller mappings for SDL2 and SDL3
- Text database compatible with SDL’s native API
- Broad support for many brands and models of gamepads
- Easy to update and extend by contributors
- Cross-platform consistent controller behavior
- Simple load-at-runtime mechanism for SDL apps