Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Commit

Permalink
Add support for SDL_GameControllerDB
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed May 14, 2015
1 parent a215cce commit e55742c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/SDL2/SDL2_GamePlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,18 @@ public SDL2_GamePlatform(Game game) : base(game, SDL.SDL_GetPlatform())
);
}

// If available, load the SDL_GameControllerDB
string mappingsDB = Path.Combine(
TitleContainer.Location,
"gamecontrollerdb.txt"
);;
if (File.Exists(mappingsDB))
{
SDL.SDL_GameControllerAddMappingsFromFile(
mappingsDB
);
}

// Set and initialize the SDL2 window
Window = new SDL2_GameWindow();

Expand Down

0 comments on commit e55742c

Please sign in to comment.