Workaround for SDL_HAPTIC_INFINITY failing in Windows is no longer needed (patched in SDL as of 2 months ago)

This commit is contained in:
Alex Szpakowski
2013-12-17 04:03:04 -04:00
parent 417964e415
commit 71dd15838e
+1 -4
View File
@@ -364,10 +364,7 @@ bool Joystick::setVibration(float left, float right)
memset(&vibration.effect, 0, sizeof(SDL_HapticEffect));
vibration.effect.type = SDL_HAPTIC_LEFTRIGHT;
// SDL's Xinput code has an int. overflow bug with SDL_HAPTIC_INFINITY.
const Uint32 long_time = 1000 * 60 * 60 * 2;
vibration.effect.leftright.length = long_time;
vibration.effect.leftright.length = SDL_HAPTIC_INFINITY;
vibration.effect.leftright.large_magnitude = Uint16(left * LOVE_UINT16_MAX);
vibration.effect.leftright.small_magnitude = Uint16(right * LOVE_UINT16_MAX);