The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL2/Win32: ForceFeedback SDL_POLAR not working on Steering
mungewell


Joined: 17 Nov 2011
Posts: 40
Quote:
Quote:
Using PySDL2 and a 'testhaptic.py' script (*) I have noticed that the
effects don't work if they are specified with a POLAR direction and
'output' on a 1-axis gaming steering wheel (ie. Logitech Driving Force
Pro).

Quote:
So the problem is with the effect as it's passed to DirectX:
http://hg.libsdl.org/SDL/file/9159d5c47819/src/haptic/windows/SDL_syshaptic.c#l1466

The next question is whether this is because DirectX does not allow POLAR
on 1 axis, or if the call to 'SDL_SYS_ToDIEFFECT' (a few lines above) is
creating a corrupted effect....

After reading around on this I have come to the conclusion that 1-Axis
devices can not accept POLAR effects under DirectX.

No 'firm' statement/definitions but a couple of inferences:
http://msdn.microsoft.com/en-us/library/windows/desktop/ee417536%28v=vs.85%29.aspx
--
Single-Axis Effects

Setting up the direction for a single-axis effect is easy because there is
nothing to specify. Put the DIEFF_CARTESIAN flag in the dwFlags member of
the DIEFFECT structure and set rglDirection to point to a single LONG
containing the value 0.
--

And 'Fedit' (the .ffe file editor) will automatically convert a 1-axis
polar effect to cartesian before playing it back.


I can work around this 'feature' in my code, the only real problem is that
it would probably mean that the directional properties of a 2D effect
could get 'lost' when played back on a 1-axis device.

Simon.
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org