What is the OSX version of DirectInput?
What is the OSX equavalent to DirectInput
I think InputSprockets is only for macos9, so that not it.
using the window to capture mouse+keyboard is not as fast. It is also subject to the users repeat setting, which would affect gameplay.
Anyone know what Q3 on mac is doing for userinput?
Thanks
I think InputSprockets is only for macos9, so that not it.
using the window to capture mouse+keyboard is not as fast. It is also subject to the users repeat setting, which would affect gameplay.
Anyone know what Q3 on mac is doing for userinput?
Thanks
Q3A uses the standard event mechanism.
There's no reason to make input depend on key repeat rate.
The HID manager is the equivalent of DirectInput. It's quite difficult to use, though.
There's no reason to make input depend on key repeat rate.
The HID manager is the equivalent of DirectInput. It's quite difficult to use, though.
Assuming you're using Carbon, the best choice for keyboard and mouse input would probably be to use Carbon Events to get the key up/key down events and mouse deltas; if you want to support other game controllers, you'll need to use the HID Manager, which is OS X only and is woefully undocumented. (The HID manager also can be used for keyboard and mouse input on OS X 10.2 and later.)
check out Amelio <http://doomlegacy.idevgames.com/amelio/>
Everything you need is in the HID Utilities at:
<http://developer.apple.com/samplecode/Sa...dware/HID_
Manager/HID_Utilities_Source.htm>.
The "interesting" API's are:
HIDBuildDeviceList - This creates a list of all the HID devices.
HIDReleaseDeviceList - call this when you're done with the list.
HIDGetFirst/NextDevice - used to iterate the devices
HIDGetFirst/NextDeviceElement - used to iterate elements of a device.
HIDGetElementNameFromVendorProduct[Cookie|Usage] - Get text name of an
element.
HIDQueueDevice - Add all device elements to event queue
HIDDequeueDevice - remove device from event queue
HIDQueueElement - Add element to event queue
HIDDequeueElement - remove element from event queue
HIDGetEvent - poll queue for events
You may incorporate the entire HID Utilities into your project as-is or cut
& paste the pieces that you need.
<http://developer.apple.com/samplecode/Sa...dware/HID_
Manager/HID_Utilities_Source.htm>.
The "interesting" API's are:
HIDBuildDeviceList - This creates a list of all the HID devices.
HIDReleaseDeviceList - call this when you're done with the list.
HIDGetFirst/NextDevice - used to iterate the devices
HIDGetFirst/NextDeviceElement - used to iterate elements of a device.
HIDGetElementNameFromVendorProduct[Cookie|Usage] - Get text name of an
element.
HIDQueueDevice - Add all device elements to event queue
HIDDequeueDevice - remove device from event queue
HIDQueueElement - Add element to event queue
HIDDequeueElement - remove element from event queue
HIDGetEvent - poll queue for events
You may incorporate the entire HID Utilities into your project as-is or cut
& paste the pieces that you need.
Greetings,
When the source code for this year's uDevGame is released, you can check out how it is done in Pirate Isle... it wrappers HID utilities directly in order to provide a single, cross-platform input solution. At the very least it will give you some sample code to learn from.
Cheers,
Rocco
When the source code for this year's uDevGame is released, you can check out how it is done in Pirate Isle... it wrappers HID utilities directly in order to provide a single, cross-platform input solution. At the very least it will give you some sample code to learn from.
Cheers,
Rocco
Virus Out
Big Bang Board Games
Adventures on Pirate Isle
Solace - Strategy, War, and Glory!
The Belt
Quote:Originally posted by KittyMac
When the source code for this year's uDevGame is released, you can check out how it is done in Pirate Isle... it wrappers HID utilities directly in order to provide a single, cross-platform input solution
That's excellent news, I look forward to seeing your work!
Quote:Originally posted by aegidian
That's excellent news, I look forward to seeing your work!
I forgot to mention that do to the short development schedual for uDevGame the feature set I implemented is limited. Basically, it allows for simple button presses only (since PI only needed gamepad and button support), but it does properly "virtualize" axis movement to make them into buttons (special thanks to the Gravis Gamepad for only giving joystick values for it's pad
). Just a warning that this won't be a plug-n-play solution, simply another piece of sample code to learn from.Cheers,
Rocco
Virus Out
Big Bang Board Games
Adventures on Pirate Isle
Solace - Strategy, War, and Glory!
The Belt
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Mac version of ... | Jamie W | 0 | 1,649 |
Mar 23, 2009 10:22 AM Last Post: Jamie W |
|

