Mac and Linux SDL2 binary snapshots
Edward Rudd
2018-08-19 561f0d614098a95527367cc3f911e476f35643d6
source/src/haptic/windows/SDL_xinputhaptic.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -278,8 +278,9 @@
{
    XINPUT_VIBRATION *vib = &effect->hweffect->vibration;
    SDL_assert(data->type == SDL_HAPTIC_LEFTRIGHT);
    vib->wLeftMotorSpeed = data->leftright.large_magnitude;
    vib->wRightMotorSpeed = data->leftright.small_magnitude;
    /* SDL_HapticEffect has max magnitude of 32767, XInput expects 65535 max, so multiply */
    vib->wLeftMotorSpeed = data->leftright.large_magnitude * 2;
    vib->wRightMotorSpeed = data->leftright.small_magnitude * 2;
    SDL_LockMutex(haptic->hwdata->mutex);
    if (haptic->hwdata->stopTicks) {  /* running right now? Update it. */
        XINPUTSETSTATE(haptic->hwdata->userid, vib);