|Jan 2, 2013, 02:30 PM||#1|
Gamepads / IOHID: Analogous values for RT, LT?
I'm implementing a class that listens to gamepads using Apple's IOHID API. Currently, the following works: When I plug in a gamepad, the class recognizes it. A, B, X and Y buttons are read as booleans, while joystick values XY and PO are read as doubles. (For the latter, I fetch min and max for the element and scale the integer value so it always stays between -1..+1.)
So far, so clear. The problem is that the two lower back buttons (RT, LT) always return either minimum or maximum values, i.e. bools, but they really should be analogous, i.e. doubles like XY and PO.
I've googled a bit and learnt that this is where XInput comes in. There is a switch at the back of my Logitech Gamepad F310 that lets me choose between XInput and DirectInput. Mac OS X does not seem to be able to deal with XInput enabled, so I always leave the switch to DirectInput.
-> Is it possible to read the analogous values of RT, LT with DirectInput switch enabled?
-> If not, is it possible to set up a IOHID dictionary that recognizes the device when XInput is enabled?
-> Is there any other trick I could try?
Thanks for any replies!
|Thread Tools||Search this Thread|
All times are GMT -5. The time now is 11:00 PM.