Remember to close the game controller when we're done with it
authorSam Lantinga
Fri, 27 Nov 2020 18:57:42 -0800
changeset 144130ba75e4da3e1
parent 14412 e9ca80b97a95
child 14414 8e0630790a22
Remember to close the game controller when we're done with it
test/testgamecontroller.c
     1.1 --- a/test/testgamecontroller.c	Fri Nov 27 18:57:40 2020 -0800
     1.2 +++ b/test/testgamecontroller.c	Fri Nov 27 18:57:42 2020 -0800
     1.3 @@ -191,6 +191,8 @@
     1.4          return;
     1.5      }
     1.6  
     1.7 +    SDL_GameControllerClose(gamecontrollers[i]);
     1.8 +
     1.9      --num_controllers;
    1.10      if (i < num_controllers) {
    1.11          SDL_memcpy(&gamecontrollers[i], &gamecontrollers[i+1], (num_controllers - i) * sizeof(*gamecontrollers));