Added support to use controllers via SDL_GameController. (#2509)

Updated sdl examples to use SDL_INIT_GAMECONTROLLER flag
This commit is contained in:
David Amador
2019-04-22 13:34:34 +01:00
committed by omar
parent 16e9b8191b
commit 994a92d79d
4 changed files with 49 additions and 3 deletions

View File

@ -319,7 +319,7 @@ static void FramePresent(ImGui_ImplVulkanH_Window* wd)
int main(int, char**)
{
// Setup SDL
if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER) != 0)
if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_GAMECONTROLLER) != 0)
{
printf("Error: %s\n", SDL_GetError());
return 1;