mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-04-29 20:06:18 +00:00
Remember to close the game controller when we're done with it
This commit is contained in:
parent
1f2f536bd2
commit
04f0fd13b5
|
@ -191,6 +191,8 @@ static void DelController(SDL_JoystickID controller)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDL_GameControllerClose(gamecontrollers[i]);
|
||||||
|
|
||||||
--num_controllers;
|
--num_controllers;
|
||||||
if (i < num_controllers) {
|
if (i < num_controllers) {
|
||||||
SDL_memcpy(&gamecontrollers[i], &gamecontrollers[i+1], (num_controllers - i) * sizeof(*gamecontrollers));
|
SDL_memcpy(&gamecontrollers[i], &gamecontrollers[i+1], (num_controllers - i) * sizeof(*gamecontrollers));
|
||||||
|
|
Loading…
Reference in a new issue