Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Haptic: Let XInput update effects while they're still running.

  • Loading branch information
icculus committed Aug 10, 2013
1 parent 692dde1 commit be730dea566ff5f781e5af32dde569d589760530

File 1 of 1 in be730de

@@ -1275,6 +1275,11 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
SDL_assert(data->type == SDL_HAPTIC_LEFTRIGHT);
vib->wLeftMotorSpeed = data->leftright.large_magnitude;
vib->wRightMotorSpeed = data->leftright.small_magnitude;
SDL_LockMutex(haptic->hwdata->mutex);
if (haptic->hwdata->stopTicks) { /* running right now? Update it. */
XINPUTSETSTATE(haptic->hwdata->userid, vib);
}
SDL_UnlockMutex(haptic->hwdata->mutex);
return 0;
}

0 comments on commit be730de

Please sign in to comment.