Browse Source

Linux Haptic: Fix periodic.magnitude value

Ethan Lee 6 years ago
parent
commit
0b6e24f7e7
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/haptic/linux/SDL_syshaptic.c

+ 1 - 2
src/haptic/linux/SDL_syshaptic.c

@@ -801,8 +801,7 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src)
         else if (periodic->type == SDL_HAPTIC_SAWTOOTHDOWN)
             dest->u.periodic.waveform = FF_SAW_DOWN;
         dest->u.periodic.period = CLAMP(periodic->period);
-        /* Linux expects 0-65535, so multiply by 2 */
-        dest->u.periodic.magnitude = CLAMP(periodic->magnitude) * 2;
+        dest->u.periodic.magnitude = periodic->magnitude;
         dest->u.periodic.offset = periodic->offset;
         /* Linux phase is defined in interval "[0x0000, 0x10000[", corresponds with "[0deg, 360deg[" phase shift. */
         dest->u.periodic.phase = ((Uint32)periodic->phase * 0x10000U) / 36000;