src/joystick/haiku/SDL_haikujoystick.cc
changeset 10994 50ffb2b7ee1c
parent 10753 220a81177cfb
child 11164 3862687cef22
equal deleted inserted replaced
10993:0283fa2192cd 10994:50ffb2b7ee1c
   226 /* Function to perform any system-specific joystick related cleanup */
   226 /* Function to perform any system-specific joystick related cleanup */
   227     void SDL_SYS_JoystickQuit(void)
   227     void SDL_SYS_JoystickQuit(void)
   228     {
   228     {
   229         int i;
   229         int i;
   230 
   230 
   231         for (i = 0; SDL_joyport[i]; ++i) {
   231         for (i = 0; i < SDL_SYS_numjoysticks; ++i) {
   232             SDL_free(SDL_joyport[i]);
   232             SDL_free(SDL_joyport[i]);
   233         }
   233         }
   234         SDL_joyport[0] = NULL;
   234         SDL_joyport[0] = NULL;
   235 
   235 
   236         for (i = 0; SDL_joyname[i]; ++i) {
   236         for (i = 0; i < SDL_SYS_numjoysticks; ++i) {
   237             SDL_free(SDL_joyname[i]);
   237             SDL_free(SDL_joyname[i]);
   238         }
   238         }
   239         SDL_joyname[0] = NULL;
   239         SDL_joyname[0] = NULL;
   240     }
   240     }
   241 
   241