mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user