dinput: Fix phase conversion on periodic effects.
Based on idea by Elias Vanderstuyft. Signed-off-by: Bruno Jesus <00cpxxx@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
305d89f1ed
commit
5ab0126f1d
|
@ -632,7 +632,8 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
|
|||
|
||||
This->effect.u.periodic.magnitude = (tsp->dwMagnitude / 10) * 32;
|
||||
This->effect.u.periodic.offset = (tsp->lOffset / 10) * 32;
|
||||
This->effect.u.periodic.phase = (tsp->dwPhase / 9) * 8; /* == (/ 36 * 32) */
|
||||
/* phase ranges from 0 - 35999 in dinput and 0 - 65535 on linux */
|
||||
This->effect.u.periodic.phase = (tsp->dwPhase / 36) * 65;
|
||||
/* dinput uses microseconds, linux uses miliseconds */
|
||||
if (tsp->dwPeriod <= 1000)
|
||||
This->effect.u.periodic.period = 1;
|
||||
|
|
Loading…
Reference in New Issue