Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old Jan 2, 2013, 02:30 PM   #1
macrumors newbie
Join Date: Jan 2013
Gamepads / IOHID: Analogous values for RT, LT?

Hi there!

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!
digory is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
OS X: FlatOut 2 (Mac App Store) - do gamepads still work? nagromme Mac and PC Games 3 Jun 3, 2014 07:37 AM
Resale values. Southernboyj MacBook Pro 24 Oct 3, 2013 03:05 PM
5S Instant Re-sale Values rockitdog iPhone 63 Sep 17, 2013 10:25 PM
MacBook Pro Retina & Gamepads (specifically, Logitech Dual Action/F310) muotim MacBook Pro 4 Sep 18, 2012 04:23 PM

Forum Jump

All times are GMT -5. The time now is 02:32 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013,, LLC