How do I configure devices?

Hello,

I’m just wondering what the best method would be to be able to associate a component with its place on the controller. eg. Which axis is the input from the up/down direction on the right stick? Which button is the ‘Start’ button?

All I can think of right now is that I would have to get each user to configure their device, and save the results in a file. The file would contain the component index number, and its position on the actual controller.

Also there is a complication as with one of my gamepads there are five axes detected (It’s a playstation style copy). One of these axes provides input when either stick is moved… :-\

Is there a better way of doing this?

Thanks

Charlie

Hi

When you get an event from the event queue the component identifier lets you know which axis it was.

Endolf

Yes, but do all gamepads have

X Axis - Left stick horizontal
Y Axis - Left stick vertical
Z Axis - Right stick horizontal
RZ Axis - Right stick vertical

as the one I’m testing with does?

Ok, I see what you mean.

Short answer: no

Longer answer: no, it’s up to the directx/linux/osx driver what axis relates to what physical component.

Endolf.