Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » PLEASE FIX: Joystick rotation axis enumeration bug

Credits go to gnolam, miran, and Peter Wang for helping out!
This thread is locked; no one can reply to it. rss feed Print
 1   2 
PLEASE FIX: Joystick rotation axis enumeration bug
Peter Wang
Member #23
April 2000

Can someone check if the same problem exists in 4.3? I think I'd already taken gnolam's change to wjoydx.c into account in the 4.3 branch, and the approach I took was to group Rx,Ry,Rz into a single stick. It might not be right, but we could do the same for 4.2.

gnolam
Member #2,030
March 2002
avatar

I'm pretty hazy on what exactly affects ABI compatbility - would a "shadow array" of element-to-name mapping (to solve the name problem at least) be doable or would it break anything?

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Peter Wang
Member #23
April 2000

That would be fine. The problem with bumping the MAX_* constants (except for MAX_JOYSTICKS) is that it changes the size of the elements of the joy[] array, so a program compiled with 4.2.0 would have different ideas of the offset of &joy[N] compared to a DLL compiled with your patch.

Michael Jensen
Member #2,870
October 2002
avatar

Quote:

You don't start building a house without first drawing up detailed plans. Likewise, you don't contribute to a project with no apparent direction unless you get paid for it.

I'm kind of out of the loop since I've stayed out of the Allegro 5 discussion. But I was under the impression that a whole freakin wiki existed about what's been done/planning for allegro 5...

If there arn't "planning docs", then maybe someone should make them. Has the actual planning not been done? If so, I'd say gnolam's right, and that's not a minor issue. (The absence of planning, not gnolam being right.)

Cortex Commander
Member #7,908
October 2006

Alright, I didn't defect to SDL quite yet. Instead, did as Miram suggested: patched my local SVN copy of allegro with gnolam's fix, built the static libs and finally rebuilt my game with them.

And... it works! I can now use the rotation axes. You guys rock!

Please don't be disheartened and give up development on allegro, folks. It's worth it!

Thanks again,
- D

 1   2 


Go to: