Re-Create Force Feedback Effect Failed

Joined
Jul 5, 2007
Messages
1
Reaction score
0
I am currently writing a program that will use a force feedback joystick. The one I am using is Microsoft Force Feedback Sidewinder 2.
I am able to create, acquire, and use the device.
I am even able to create some effects.

My problem:
If while my test program is running, and the joystick is unplugged, then I call the uninitialize method where the effects and joystick device are unacquired and released.

Then, I enter a loop where I continuously try to re-initialize the device.

If I plug the device back in, the joystick initializes fine and I can use it, except I get a failure when I try to recreate the effects. Thus, the Joystick functions without any effects.

That is, after the joystick is re-created, and acquired this line fails:
g_lpDIDeviceJoystick->CreateEffect(GUID_Spring,&springEffect,&g_pFFEffect[FF_EFFECT_SPRING],NULL)

I am not sure why, but it is as if the device has not released the effect, and it cannot recreate it.

Any suggestions?

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top