diff --git a/src/SDL2/SDL2_FNAPlatform.cs b/src/SDL2/SDL2_FNAPlatform.cs index 90f6ff0..f80e6ca 100644 --- a/src/SDL2/SDL2_FNAPlatform.cs +++ b/src/SDL2/SDL2_FNAPlatform.cs @@ -43,6 +43,18 @@ namespace Microsoft.Xna.Framework */ SDL.SDL_SetMainReady(); + // If available, load the SDL_GameControllerDB + string mappingsDB = Path.Combine( + TitleContainer.Location, + "gamecontrollerdb.txt" + ); + if (File.Exists(mappingsDB)) + { + SDL.SDL_GameControllerAddMappingsFromFile( + mappingsDB + ); + } + // This _should_ be the first real SDL call we make... SDL.SDL_Init( SDL.SDL_INIT_VIDEO | @@ -60,18 +72,6 @@ namespace Microsoft.Xna.Framework "1" ); } - - // If available, load the SDL_GameControllerDB - string mappingsDB = Path.Combine( - TitleContainer.Location, - "gamecontrollerdb.txt" - ); - if (File.Exists(mappingsDB)) - { - SDL.SDL_GameControllerAddMappingsFromFile( - mappingsDB - ); - } } public static void ProgramExit(object sender, EventArgs e)