Permalink
Browse files

Add support for SDL_GameControllerDB

  • Loading branch information...
flibitijibibo committed May 14, 2015
1 parent a215cce commit e55742cfe7e38b778a21ed8a12cb2f2081490d8d
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/SDL2/SDL2_GamePlatform.cs
@@ -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();

0 comments on commit e55742c

Please sign in to comment.