src/joystick/windows/SDL_windowsjoystick.c
changeset 10617 346c02ff71b6
parent 10479 aa816d06ed78
child 10737 3406a0f8b041
equal deleted inserted replaced
10616:d17dd08640a4 10617:346c02ff71b6
   305     return SDL_SYS_NumJoysticks();
   305     return SDL_SYS_NumJoysticks();
   306 }
   306 }
   307 
   307 
   308 /* return the number of joysticks that are connected right now */
   308 /* return the number of joysticks that are connected right now */
   309 int
   309 int
   310 SDL_SYS_NumJoysticks()
   310 SDL_SYS_NumJoysticks(void)
   311 {
   311 {
   312     int nJoysticks = 0;
   312     int nJoysticks = 0;
   313     JoyStick_DeviceData *device = SYS_Joystick;
   313     JoyStick_DeviceData *device = SYS_Joystick;
   314     while (device) {
   314     while (device) {
   315         nJoysticks++;
   315         nJoysticks++;
   319     return nJoysticks;
   319     return nJoysticks;
   320 }
   320 }
   321 
   321 
   322 /* detect any new joysticks being inserted into the system */
   322 /* detect any new joysticks being inserted into the system */
   323 void
   323 void
   324 SDL_SYS_JoystickDetect()
   324 SDL_SYS_JoystickDetect(void)
   325 {
   325 {
   326     JoyStick_DeviceData *pCurList = NULL;
   326     JoyStick_DeviceData *pCurList = NULL;
   327 
   327 
   328     /* only enum the devices if the joystick thread told us something changed */
   328     /* only enum the devices if the joystick thread told us something changed */
   329     if (!s_bDeviceAdded && !s_bDeviceRemoved) {
   329     if (!s_bDeviceAdded && !s_bDeviceRemoved) {