Fixed bug 2766 - Haptic coding bugs and fixes for Linux FF: periodic.phase handled as time instead of angle; + direction clarification
authorSam Lantinga <slouken@libsdl.org>
Sat, 29 Nov 2014 11:49:58 -0800
changeset 925050fb32b7f2bd
parent 9249 35a4fab04296
child 9251 198989b162d3
Fixed bug 2766 - Haptic coding bugs and fixes for Linux FF: periodic.phase handled as time instead of angle; + direction clarification

Elias Vanderstuyft

"Horizontal" is not very precise, use "Positive phase" instead.
"Positive" because it's actually waveform(2*pi*t + phase) instead of waveform(2*pi*t - phase).
include/SDL_haptic.h
     1.1 --- a/include/SDL_haptic.h	Sat Nov 29 11:48:43 2014 -0800
     1.2 +++ b/include/SDL_haptic.h	Sat Nov 29 11:49:58 2014 -0800
     1.3 @@ -558,7 +558,7 @@
     1.4      Uint16 period;      /**< Period of the wave. */
     1.5      Sint16 magnitude;   /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */
     1.6      Sint16 offset;      /**< Mean value of the wave. */
     1.7 -    Uint16 phase;       /**< Horizontal shift given by hundredth of a degree. */
     1.8 +    Uint16 phase;       /**< Positive phase shift given by hundredth of a degree. */
     1.9  
    1.10      /* Envelope */
    1.11      Uint16 attack_length;   /**< Duration of the attack. */