Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Haptic: Let XInput update effects while they're still running.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 10, 2013
1 parent 692dde1 commit be730de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/haptic/windows/SDL_syshaptic.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit be730de

Please sign in to comment.