Haptic: Let XInput update effects while they're still running.
This commit is contained in:
parent
de6d6a5554
commit
d4f386f5e3
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue