Skip to content

Commit

Permalink
bug fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Seng-Jik committed Mar 12, 2022
1 parent 21a8a4b commit 7badc38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpymo-backends/sdl2/cpymo_backend_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ void cpymo_input_refresh_joysticks()
if (gamecontrollers) {
memset(gamecontrollers, 0, sizeof(gamecontrollers[0]) * gamecontrollers_count);
size_t j = 0;
for (int i = 0; i < gamecontrollers_count; ++i)
if (SDL_IsGameController(i))
gamecontrollers[j++] = SDL_GameControllerOpen(i);
for (size_t i = 0; i < gamecontrollers_count; ++i)
if (SDL_IsGameController((int)i))
gamecontrollers[j++] = SDL_GameControllerOpen((int)i);
}
}

0 comments on commit 7badc38

Please sign in to comment.