You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.1 Reported for operating system, platform: All, x86_64
Comments on the original bug report:
On 2014-08-23 20:59:44 +0000, Elias Vanderstuyft wrote:
This is something funny, a feature of the Linux FF API that doesn't exist in Windows' and MacOS' FF APIs:
a negative periodic magnitude.
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.
First I fixed some typos about angle units in the Haptic API doc (first patch: "vanilla-rev1.diff").
Then I created a patch to solve the problem by adding 180 degrees phase shift when the magnitude is negative (second patch: "rev1-rev2.diff").
WARNING: this patch is UNTESTED (as is the compilation), since I don't have the necessary access to a Windows or MacOS machine. Please verify this patch before applying it!
Both patches are based on yesterday's hg snapshot: SDL-2.0.3-9108
In the second patch you can see I also edited "testhaptic.c" to test the patch's changes:
To a user, the direction of the force of "Effect0 - Sine" should remain the same before and after this patch, since a negative magnitude combined with a 180 degrees phase shift will cancel out and become a positive magnitude combined with a zero degrees phase shift.
Finally, I included some images to graphically visualize exactly how the force output of "testhaptic" should be:
"Effect0_Sine.png"
"Effect1_SawtoothUp.png"
"Effect2_Constant.png"
"Effect7_Ramp.png"
I should note here that the forces and directions are defined in the Linux FF sense: the direction in which the force is applied by the joystick; not the direction where the force comes from!
On 2014-08-23 21:01:13 +0000, Elias Vanderstuyft wrote:
Created attachment 1841
Fix some typos about angle units in the Haptic API doc
On 2014-08-23 21:04:42 +0000, Elias Vanderstuyft wrote:
Created attachment 1842
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.
WARNING: this patch is UNTESTED (as is the compilation)
On 2014-08-23 21:06:26 +0000, Elias Vanderstuyft wrote:
Created attachment 1843
Effect0_Sine.png
testhaptic.c: effect[0]: Sine
The forces and directions are defined in the Linux FF sense: the direction in which the force is applied by the joystick; not the direction where the force comes from!
On 2014-08-23 21:06:55 +0000, Elias Vanderstuyft wrote:
Created attachment 1844
Effect1_SawtoothUp.png
testhaptic.c: effect[1]: SawtoothUp
The forces and directions are defined in the Linux FF sense: the direction in which the force is applied by the joystick; not the direction where the force comes from!
On 2014-08-23 21:07:20 +0000, Elias Vanderstuyft wrote:
Created attachment 1845
Effect2_Constant.png
testhaptic.c: effect[2]: Constant
The forces and directions are defined in the Linux FF sense: the direction in which the force is applied by the joystick; not the direction where the force comes from!
On 2014-08-23 21:07:45 +0000, Elias Vanderstuyft wrote:
Created attachment 1846
Effect7_Ramp.png
testhaptic.c: effect[7]: Ramp
The forces and directions are defined in the Linux FF sense: the direction in which the force is applied by the joystick; not the direction where the force comes from!
On 2014-09-17 18:52:17 +0000, Ryan C. Gordon wrote:
These patches are in revision control now, thanks!
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.1
Reported for operating system, platform: All, x86_64
Comments on the original bug report:
On 2014-08-23 20:59:44 +0000, Elias Vanderstuyft wrote:
On 2014-08-23 21:01:13 +0000, Elias Vanderstuyft wrote:
On 2014-08-23 21:04:42 +0000, Elias Vanderstuyft wrote:
On 2014-08-23 21:06:26 +0000, Elias Vanderstuyft wrote:
On 2014-08-23 21:06:55 +0000, Elias Vanderstuyft wrote:
On 2014-08-23 21:07:20 +0000, Elias Vanderstuyft wrote:
On 2014-08-23 21:07:45 +0000, Elias Vanderstuyft wrote:
On 2014-09-17 18:52:17 +0000, Ryan C. Gordon wrote:
The text was updated successfully, but these errors were encountered: