Hi, I'm new to this lark.
I'm a student using lwjgl to attach a Guitar hero guitar to a music program I'm writing (windows).
Everything works fine but some time after I've used:
Controllers.create();
I want to be able to be able to update the Controllers with their current state.
I was wondering if there was a way. Controllers.destroy() doesn't achieve this.
Any ideas out there?
Thanks!
Quote from: WibbleMan on April 18, 2008, 15:31:20
I'm a student using lwjgl to attach a Guitar hero guitar to a music program I'm writing (windows).
Cool :).
When you check the input, use:
Controllers.poll();
while( Controllers.next() ) {
// Read the state of the controllers (i.e. Controllers.getEventSource(), etc.)
}
-gz
Aha, I hven't tried that.
Will that detect if I've plugged in/removed a controller since using the
Controllers.create();
command then?
Thanks
Almost every program needs to have the controller attached before it starts; LWJGL is one of those to my knowledge.
I would say most users should be able to understand this, so not detecting it at runtime should be fine.
It's not LWJGL's fault. LWJGL just uses JInput, which currently doesn't support hot-plug-detection. I posted this issue on javagaming.org (http://www.javagaming.org/index.php/topic,18592.0.html) some time ago. They will hopefully implement it soon.
Marvin