equal
deleted
inserted
replaced
158 if (SDL_SYS_JoystickOpen(&nj) == 0) { |
158 if (SDL_SYS_JoystickOpen(&nj) == 0) { |
159 SDL_SYS_JoystickClose(&nj); |
159 SDL_SYS_JoystickClose(&nj); |
160 SDL_numjoysticks++; |
160 SDL_numjoysticks++; |
161 } else { |
161 } else { |
162 free(joynames[nj.index]); |
162 free(joynames[nj.index]); |
|
163 joynames[nj.index] = NULL; |
163 } |
164 } |
164 } |
165 } |
165 for (i = 0; i < MAX_JOY_JOYS; i++) { |
166 for (i = 0; i < MAX_JOY_JOYS; i++) { |
166 sprintf(s, "/dev/joy%d", i); |
167 sprintf(s, "/dev/joy%d", i); |
167 fd = open(s, O_RDONLY); |
168 fd = open(s, O_RDONLY); |