Closing the joystick removes it from the list.
This commit is contained in:
parent
10823d6065
commit
22e0d6fa53
1 changed files with 1 additions and 1 deletions
|
@ -404,7 +404,7 @@ SDL_JoystickQuit(void)
|
||||||
SDL_numjoysticks = 0;
|
SDL_numjoysticks = 0;
|
||||||
|
|
||||||
for (i = 0; i < numsticks; i++) {
|
for (i = 0; i < numsticks; i++) {
|
||||||
SDL_Joystick *stick = SDL_joysticks[i];
|
SDL_Joystick *stick = SDL_joysticks[0];
|
||||||
if (stick && (stick->ref_count >= 1)) {
|
if (stick && (stick->ref_count >= 1)) {
|
||||||
stick->ref_count = 1;
|
stick->ref_count = 1;
|
||||||
SDL_JoystickClose(stick);
|
SDL_JoystickClose(stick);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue