|
pjcast
|
 |
« Reply #15 on: September 01, 2009, 05:30:55 PM » |
|
OK, you appear to have been a project member, but no cvs access permissions. Corrected now.
|
|
|
|
|
Logged
|
|
|
|
|
mysterycoder
|
 |
« Reply #16 on: September 02, 2009, 12:04:39 AM » |
|
Ah thanks, I've just committed what I have so far. So far it supports axes, buttons, and multiple joysticks.  Unfortunately, I can't develop the support for pov yet as I don't have any joysticks with them. Also there's no force feedback support or detection for device removal, but I hope to add those features soon. I've successfully tested it with a Gravis GamePad Pro and a Logitech WingMan Rumble. The Gravis Destroyer Tilt I tested it with was not detected, though I am thinking it is only a problem with the usage flags. Also, I realize that there is overlap in the enumeration code between MacHIDManager and MacJoyStick. I will resolve that ASAP. Would you rather the d-pad on game pads be detected as an two axes or a pov?
|
|
|
|
« Last Edit: September 02, 2009, 12:25:11 AM by mysterycoder »
|
Logged
|
|
|
|
|
pjcast
|
 |
« Reply #17 on: September 02, 2009, 06:34:58 AM » |
|
A digital d-pad should show up as a POV/HAT if possible.
|
|
|
|
|
Logged
|
|
|
|
|
mysterycoder
|
 |
« Reply #18 on: September 02, 2009, 08:50:18 AM » |
|
Ok, I'll work on that. Btw the Gravis Tilt is working now.
|
|
|
|
|
Logged
|
|
|
|
|
pjcast
|
 |
« Reply #19 on: September 02, 2009, 04:36:20 PM » |
|
That's cool. I'll try and do some testing with the controller I have as well.
|
|
|
|
|
Logged
|
|
|
|
|
mysterycoder
|
 |
« Reply #20 on: September 03, 2009, 02:40:51 PM » |
|
That'd be great. I've be looking at making the D-Pad a Pov/Hat and there doesn't seem to be a way to detect the D-Pad vs the analog sticks on my wingman rumble. Do you have any ideas for detection? - I was thinking that even if the D-Pad was detected as two axes, I could emulate a POV by reading the axes and determining the directions from that.
|
|
|
|
|
Logged
|
|
|
|
|
pjcast
|
 |
« Reply #21 on: September 03, 2009, 05:18:33 PM » |
|
If you can't determine something is a POV, emulating is unpractical for every device. I'll take a look what my Xbox controller shows up as.
|
|
|
|
|
Logged
|
|
|
|
|
pjcast
|
 |
« Reply #22 on: September 03, 2009, 07:56:00 PM » |
|
Gosh, everytime I open up Xcode I find myself frustrated.
Anyway, I managed to get and build the latest. I had to add MacJoystick.cpp to the xcode project, because I was getting unresolved externals. I did not commit, would be better if you committed what you have working.
I tested with XBox (original cotroller). Axis sticks seemed to work well. However, the D-pad showed up as buttons? And, when I pushed any other buttons, the joystick would stop firing all events after that. And, the triggers did not work either. Though, overall, i would say great progress - just some wrinkles to iron out. I'll see if I can find some other joystick to test against. I may try to debug a bit this weekend to find out if there is anyway to find the D-Pad (maybe it is just an alien concept to OSX and we might have to settle with it being buttons or axis depending on driver). By the way, this is on Tiger & PPC machine (Macbook is still down, so am on older iMac).
|
|
|
|
|
Logged
|
|
|
|
|
mysterycoder
|
 |
« Reply #23 on: September 03, 2009, 08:50:26 PM » |
|
Ah yeah, I forgot to update the project file. Huh, I haven't had a problem with it not detecting things. Though if I remember correctly doesn't the shoulder buttons have multiple levels of pressure? Maybe they are considered sliders, which I haven't added yet. I have a PS2 Controller USB adapter - I'll try to see if I can replicate something similar. Thanks for testing it, I'm glad it works on your older machine.  I'd really appreciate the debugging as I haven't had a problem with a controller stopping receiving events, I've even gotten all three of the controllers I have going at the same time - moving their axes and mashing buttons - without a problem.
|
|
|
|
|
Logged
|
|
|
|
|
pjcast
|
 |
« Reply #24 on: September 07, 2009, 06:50:11 PM » |
|
Sorry, didn't manage to squeeze in time this weekend. I'll make sure to get it in this week after work, though. Hopefully it is something simple, and not just OSX barfing on the controller 
|
|
|
|
|
Logged
|
|
|
|
|
mysterycoder
|
 |
« Reply #25 on: September 08, 2009, 03:44:50 PM » |
|
Ah it's no problem.
Right now I'm working on the enumeration code. My PS2 -> USB converter shows up as one device but it contains two JoySticks, so I am working to support those sorts of situations.
Do you think the enumeration code should be in the HIDManager solely? or in MacJoyStick aswell?
|
|
|
|
|
Logged
|
|
|
|
|
pjcast
|
 |
« Reply #26 on: September 08, 2009, 05:04:29 PM » |
|
Enumeration is probably better suited for the HID helper class (assuming it might be useful outside of joystick devices as well).
|
|
|
|
|
Logged
|
|
|
|
|
hostep
|
 |
« Reply #27 on: September 20, 2009, 02:14:49 AM » |
|
Hi mysterycoder, great work on implementing joystick support for OS X! I just tested it with my PS3 controller, and found out that the button numbers weren't correct. So I fiddled a bit around with the code in the capture function and I've fixed the issue. I suspect the axes numbers will also be a problem, but I couldn't test that, as the driver I used for my PS3 controller ( http://tattiebogle.net/index.php/ProjectRoot/Ps3Controller) doesn't appear to support axes... I've made a patch and uploaded it here: http://pieterhoste.be/ois/patchThings also solved in the patch is the compiling of the MacJoystick.cpp file, which wasn't in the xcodeproj file yet. And I also added support for unbuffered joystick input, which crashed with the current code.
|
|
|
|
|
Logged
|
|
|
|
|
mysterycoder
|
 |
« Reply #28 on: September 21, 2009, 04:40:21 PM » |
|
Thanks, the patch looks good, I'll be sure to apply it.  Sorry about the lack of updates, I just moved to college a few days ago so it's been busy.
|
|
|
|
|
Logged
|
|
|
|
|
pjcast
|
 |
« Reply #29 on: October 03, 2009, 08:12:46 AM » |
|
Been busy here as well. Also, my main laptop has now died on me.... grr.
|
|
|
|
|
Logged
|
|
|
|
|