src/haptic/windows/SDL_syshaptic.c
changeset 7858 170c9f4c3c28
parent 7857 6388f5229bb7
child 7884 15027aa2cf21
equal deleted inserted replaced
7857:6388f5229bb7 7858:170c9f4c3c28
  1565     while (!hwdata->stopThread) {
  1565     while (!hwdata->stopThread) {
  1566         SDL_Delay(50);
  1566         SDL_Delay(50);
  1567         SDL_LockMutex(hwdata->mutex);
  1567         SDL_LockMutex(hwdata->mutex);
  1568         /* If we're currently running and need to stop... */
  1568         /* If we're currently running and need to stop... */
  1569         if (hwdata->stopTicks) {
  1569         if (hwdata->stopTicks) {
  1570             if ((hwdata->stopTicks != SDL_HAPTIC_INFINITY) && SDL_TIMESTAMP_PASSED(SDL_GetTicks(), hwdata->stopTicks)) {
  1570             if ((hwdata->stopTicks != SDL_HAPTIC_INFINITY) && SDL_TICKS_PASSED(SDL_GetTicks(), hwdata->stopTicks)) {
  1571                 XINPUT_VIBRATION vibration = { 0, 0 };
  1571                 XINPUT_VIBRATION vibration = { 0, 0 };
  1572                 hwdata->stopTicks = 0;
  1572                 hwdata->stopTicks = 0;
  1573                 XINPUTSETSTATE(hwdata->userid, &vibration);
  1573                 XINPUTSETSTATE(hwdata->userid, &vibration);
  1574             }
  1574             }
  1575         }
  1575         }