Commit c521ae84bce2c927fd52e9062c0206751c9a1b7e

Ryan C. Gordon 2013-10-20T16:02:24

Patched to compile on non-C99 Microsoft compiler.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/haptic/windows/SDL_syshaptic.c b/src/haptic/windows/SDL_syshaptic.c
index 2f29fed..fa03afe 100644
--- a/src/haptic/windows/SDL_syshaptic.c
+++ b/src/haptic/windows/SDL_syshaptic.c
@@ -1564,9 +1564,8 @@ SDL_RunXInputHaptic(void *arg)
         SDL_Delay(50);
         SDL_LockMutex(hwdata->mutex);
         /* If we're currently running and need to stop... */
-        const Uint32 stopTicks = hwdata->stopTicks;
-        if (stopTicks) {
-            if ((stopTicks != SDL_HAPTIC_INFINITY) && (stopTicks < SDL_GetTicks())) {
+        if (hwdata->stopTicks) {
+            if ((hwdata->stopTicks != SDL_HAPTIC_INFINITY) && (hwdata->stopTicks < SDL_GetTicks())) {
                 XINPUT_VIBRATION vibration = { 0, 0 };
                 hwdata->stopTicks = 0;
                 XINPUTSETSTATE(hwdata->userid, &vibration);