mirror of
https://github.com/yawut/SDL.git
synced 2026-08-20 07:44:03 -05:00
Haptic: Let XInput update effects while they're still running.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user