diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c index 57682bbb5..e9a67e4d9 100644 --- a/test/testgamecontroller.c +++ b/test/testgamecontroller.c @@ -191,6 +191,8 @@ static void DelController(SDL_JoystickID controller) return; } + SDL_GameControllerClose(gamecontrollers[i]); + --num_controllers; if (i < num_controllers) { SDL_memcpy(&gamecontrollers[i], &gamecontrollers[i+1], (num_controllers - i) * sizeof(*gamecontrollers));