[AD] Joystick bug on MacOS X (Allegro 4.2.1) |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Hi! I've written about a bug in the joystick code in the Mac sources at http://www.allegro.cc/forums/thread/592349 . Attached to this mail is a diff containing the changes I made to fix the bug. As you can see, all I did was separating the HID_ELEMENT_STANDALONE_AXIS from the other options, gave it JOYFLAG_UNSIGNED and removed JOYFLAG_DIGITAL to make it consistent with what it returns when polling. One issue is still unresolved. I discovered this bug because the vertical axis of the right analogue stick on my gamepad is treated as a standalone axis. It's still reported as such (unsigned), which leads to some oddities. But as far as I can tell, that's not the fault of Allegro. For all I know, it may even be a special issue with _my_ gamepad, and I can easily work around the issue in my game. (I'm doing some conversion so all axis get treated as signed. That's what works best for my game.) I also wonder if not the analogue to digital converters should include a small dead zone (checking for, say, >3 rather than >0 as the code currently does). (Finally a big thanks to all Allegro developers. Particularly those that did the Mac port. I'm very glad that it's working now!) Regards, Rikard Peterson P.S. I'm not subscribed to this mailing list, so if you want a reply to reach me, please CC to my mail or post at allegro.cc
Attachment:
macjoy.diff
Description: Binary data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |