Questions about controllers

Started by Sardtok, February 21, 2007, 22:17:04

Previous topic - Next topic

Sardtok

Hi,
there's no problem converting button/axis indices to button/axis names.
On mice and keyboard there's no problem converting back the other way either.
But, there's no getButtonIndex or getAxisIndex in the Controller class. Why?
Would be very nice, although there's no problem storing axis and button indices in a config file,
and just look up the names when showing the configuration in a game,
a two-way conversion would be nice, especially since it is provided for mice and keyboards.

Also, my game pad has 5 axes (x, y, rx, ry and z), however, the z axis is actually two analogue buttons,
how can I tell whether the value 0 means they are both pressed or if neither is?
Of course I would've preferred if Microsoft had set it up to use two individual axes for these buttons,
but they chose not to.
Even in the Windows Game controller configuration it is reported as a single axis, with a 0 value when both are pressed.
Now, I figure that the Xbox360 handles this differently, but it seems to me, that on Windows,
there is no way to use both the analogue buttons on the Xbox360 for Windows controller(Xbox360 usb version).

EDIT:
I also noticed that there's no way to get a Controller or Controller's index from its name,
which would be nice, if people are to have a controller config saved on their computer.
Saving the ID could be risky, as you never know when a controller might have its id changed due to connecting others.
igg -- Take me off for great justice?