re "Create" controllers

Started by WibbleMan, April 18, 2008, 15:31:20

Previous topic - Next topic

WibbleMan

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!

gaarazero

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
JNewton 0.8 - Newton Dynamics wrapper for Java!
org.lwjgl.d3d - Currently Working On

WibbleMan

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

Fool Running

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.
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

Qudus

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 some time ago. They will hopefully implement it soon.

Marvin