src/joystick/windows/SDL_windowsjoystick.c
changeset 13944 b8c8ce11efc7
parent 13873 5bb6be4f2425
equal deleted inserted replaced
13943:2eec032757ce 13944:b8c8ce11efc7
   357 
   357 
   358     while (pCurList) {
   358     while (pCurList) {
   359         JoyStick_DeviceData *pListNext = NULL;
   359         JoyStick_DeviceData *pListNext = NULL;
   360 
   360 
   361         if (pCurList->bXInputDevice) {
   361         if (pCurList->bXInputDevice) {
       
   362 #if SDL_HAPTIC_XINPUT
   362             SDL_XINPUT_MaybeRemoveDevice(pCurList->XInputUserId);
   363             SDL_XINPUT_MaybeRemoveDevice(pCurList->XInputUserId);
       
   364 #endif
   363         } else {
   365         } else {
       
   366 #if SDL_HAPTIC_DINPUT
   364             SDL_DINPUT_MaybeRemoveDevice(&pCurList->dxdevice);
   367             SDL_DINPUT_MaybeRemoveDevice(&pCurList->dxdevice);
       
   368 #endif
   365         }
   369         }
   366 
   370 
   367         SDL_PrivateJoystickRemoved(pCurList->nInstanceID);
   371         SDL_PrivateJoystickRemoved(pCurList->nInstanceID);
   368 
   372 
   369         pListNext = pCurList->pNext;
   373         pListNext = pCurList->pNext;
   378         s_bDeviceAdded = SDL_FALSE;
   382         s_bDeviceAdded = SDL_FALSE;
   379         pNewJoystick = SYS_Joystick;
   383         pNewJoystick = SYS_Joystick;
   380         while (pNewJoystick) {
   384         while (pNewJoystick) {
   381             if (pNewJoystick->send_add_event) {
   385             if (pNewJoystick->send_add_event) {
   382                 if (pNewJoystick->bXInputDevice) {
   386                 if (pNewJoystick->bXInputDevice) {
       
   387 #if SDL_HAPTIC_XINPUT
   383                     SDL_XINPUT_MaybeAddDevice(pNewJoystick->XInputUserId);
   388                     SDL_XINPUT_MaybeAddDevice(pNewJoystick->XInputUserId);
       
   389 #endif
   384                 } else {
   390                 } else {
       
   391 #if SDL_HAPTIC_DINPUT
   385                     SDL_DINPUT_MaybeAddDevice(&pNewJoystick->dxdevice);
   392                     SDL_DINPUT_MaybeAddDevice(&pNewJoystick->dxdevice);
       
   393 #endif
   386                 }
   394                 }
   387 
   395 
   388                 SDL_PrivateJoystickAdded(pNewJoystick->nInstanceID);
   396                 SDL_PrivateJoystickAdded(pNewJoystick->nInstanceID);
   389 
   397 
   390                 pNewJoystick->send_add_event = SDL_FALSE;
   398                 pNewJoystick->send_add_event = SDL_FALSE;