src/haptic/windows/SDL_syshaptic.c
changeset 7849 99607295ac82
parent 7848 4f77ff668405
child 7850 ad4dc7a15ce0
equal deleted inserted replaced
7848:4f77ff668405 7849:99607295ac82
  1562 
  1562 
  1563     while (!hwdata->stopThread) {
  1563     while (!hwdata->stopThread) {
  1564         SDL_Delay(50);
  1564         SDL_Delay(50);
  1565         SDL_LockMutex(hwdata->mutex);
  1565         SDL_LockMutex(hwdata->mutex);
  1566         /* If we're currently running and need to stop... */
  1566         /* If we're currently running and need to stop... */
  1567         const Uint32 stopTicks = hwdata->stopTicks;
  1567         if (hwdata->stopTicks) {
  1568         if (stopTicks) {
  1568             if ((hwdata->stopTicks != SDL_HAPTIC_INFINITY) && (hwdata->stopTicks < SDL_GetTicks())) {
  1569             if ((stopTicks != SDL_HAPTIC_INFINITY) && (stopTicks < SDL_GetTicks())) {
       
  1570                 XINPUT_VIBRATION vibration = { 0, 0 };
  1569                 XINPUT_VIBRATION vibration = { 0, 0 };
  1571                 hwdata->stopTicks = 0;
  1570                 hwdata->stopTicks = 0;
  1572                 XINPUTSETSTATE(hwdata->userid, &vibration);
  1571                 XINPUTSETSTATE(hwdata->userid, &vibration);
  1573             }
  1572             }
  1574         }
  1573         }