Rumble Termination

If you exit a program without explicitly turning off rumble then the device continues to rumble. Can we make the library shut it off upon termination if the user didn’t?

Hi
Short answer, not that I could tell, and it’s not even as simple as that, you have to send the message and then allow the app to continue for a bit, else the rumbler carries on, my test apps did this, it’s not a jinput thing. But I’m no directx expert.

Endolf

I am surprised about endolf’s answer because even in C shutdown hooks exist. Additionaly the JVM provides them via the Runtime class: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread)

Hi
Calling the directx function is not the issue, it’s the fact that having called it, you have to hang around in the program before it will actually do it, so I could stick a wiat(1000) in there I spose, but it’s very nasty.

Endolf

Not “nasty”… I think “required”

You only have to do the wait if the rumble pack was still active in the first place. And a small delay in the shutdown hook is far less nasty than leaving the thing going! that’s like an applet that doesn’t properly turn off it’s sound :slight_smile: - I hate that :slight_smile: