Haptic: Deal with negative periodic magnitudes (thanks, Elias!).
A negative periodic magnitude doesn't exist in Windows' and MacOS' FF APIs The periodic magnitude parameter of the SDL Haptic API is based on the Linux FF API, so it means they are not directly compatible: 'dwMagnitude' is a 'DWORD', which is unsigned. Fixes Bugzilla #2701. --HG-- extra : amend_source : eb0b85870149936fd451ddb0662841112ff93d07
This commit is contained in:
parent
576ad3a595
commit
5ac5bdcea5
4 changed files with 11 additions and 6 deletions
|
@ -553,7 +553,7 @@ typedef struct SDL_HapticPeriodic
|
|||
|
||||
/* Periodic */
|
||||
Uint16 period; /**< Period of the wave. */
|
||||
Sint16 magnitude; /**< Peak value. */
|
||||
Sint16 magnitude; /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */
|
||||
Sint16 offset; /**< Mean value of the wave. */
|
||||
Uint16 phase; /**< Horizontal shift given by hundredth of a degree. */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue