Re: [AD] The huge Windows force feedback patch.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I pushed a commit to this pull request that includes sal.h before
xinput.h. It may not be the best solution but it works for now:

https://github.com/liballeg/allegro5/pull/8.patch

The first problem with "ex_haptic2" is actually correct behavior.
XInput unfortunately devices do /not/ support force feedback in
DirectInput mode. Switching the  F710 to DirectInput mode is
tantamount to disabling force feedback for it, so it won't show up in
the joystick list anymore, since that list only shows joysticks that
supports force feedback. Maybe that should be changed, though?

I know this is silly but that's how Microsoft implemented it, most
likely to discourage the use of DirectInput, and to encourage the use
of the XInput API. If you switch it back to XInput mode while
ex_haptic2 is running it should work again as it should after a few
seconds when it gets detected again by hotplugging.

I'll investigate the problem with ex_joystick_events more in detail.
One thing to keep in mind is that when switching between modes the
layout of the joypad will change. This is again one of Microsoft's
tricks in providing incomplete backward compatibility for DirectInput
for XInput devices.

On msys2 I had no problems with buttons being wrong, but perhaps
there's something about mingw that is different. I still need to
compile a few dependencies on mingw before i can compile the
examples...




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/