Re: [AD] Windows DirectInput haptic driver and some small haptic enhancements

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


On 05/16/2014 06:10 PM, beoran@xxxxxxxxxx wrote:

So, that is what is happening here. "Could not enable haptic device
actuators" means that the given DISFFC_SETACTUATORSON command on
whaptic.cpp:830 failed for some reason (perhaps it was unsupported by
your jPSX controller). At that point the function will bail out and
return NULL. However, in retrospect I think that this might be too
severe. Could you try to comment out the "return false" on line
whaptic.cpp:843, and see if that helps anything?

It removes the crash, but it does not make it work unfortunately. I tried these examples on Wine, and they worked unmodified which sort of raises the question on the usefulness of these Wine tests... I think we should post these examples on allegro.cc so that others can test them (this adapter is very sketchy).

Now, examining the failure again... the MSDN documentation of SendForceFeedbackCommand says that the device must be acquired in an exclusive cooperative level. We appear to set the joysticks' cooperative level in wjoydxnu.cpp:409 to DISCL_FOREGROUND | DISCL_NONEXCLUSIVE. You will note in the log I sent that command fails... perhaps this is related? I tried changing it to request the exclusive cooperative mode but it still failed. Something to explore further, I suppose.


I looked at the log, and it seems like two joystics are being
detected, and both have haptic capabilities. Did you connect two
joysticks? If not then this might be a different problem in the
joystick routines.

The adapter acts as two joysticks (you can connect two PSX controllers) so that's fine.

-SL




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