Skip to content

Commit

Permalink
add delay to game controller init
Browse files Browse the repository at this point in the history
  • Loading branch information
laamaa committed May 4, 2021
1 parent 1c273f7 commit 94d61f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions input.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ int initialize_game_controllers() {
int controller_index = 0;

SDL_Log("Looking for game controllers\n");
SDL_Delay(1); // Some controllers like XBone wired need a little while to get ready
// Open all available game controllers
for (int i = 0; i < num_joysticks; i++) {
if (!SDL_IsGameController(i))
Expand Down

0 comments on commit 94d61f1

Please sign in to comment.