Re: [AD] Joystick patches

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Please incorporate this patch that updates my fix from earlier:
MP-8866_name_variations.patch: changed to catch all variations of joystick name. Different versions of the windows driver report slightly different names, but they all contain the string "MP-8866".

I also corrected some grammar and re-aligned the comments in the file a little:
wjoydnu_c_fix_grammar.patch

Changes tested with Allegro SVN r19902, Win7 + MSVC Express 2010.


I've contributed several small bug fixes to Allegro 5; does that qualify me for inclusion in the authors.txt?

Thanks,
John-Kim

On Thu, Oct 7, 2010 at 1:44 AM, John Murphy <wonsungi@xxxxxxxxxx> wrote:
The attached fix_joystick_axis.patch fixes: DirectInput capabilities were not properly mapped to the Allegro joystick info.
- fixes missing stick and improperly mapped axes.
- fixes all joystick axis events look like X axis events.

The attached fix_MP_8866_joystick.patch fixes: MP-8866 Dual USB Joypad sends bad information to DirectInput:
- this work-around is specific to "MP-8866 Dual USB Joypad" only
- fixes analog R-stick is mapped to the Z and RZ axes (two different sticks!)
- fixes first four button names contain junk that cannot be printed.
- also gives some better names to buttons

Two questions:
1. What is the difference between ADD_STRING("my name") vs "my name"? Does ADD_STRING prevent a memory leak or is it possible that the string literal could be modified/deleted? I thought C++ stored string literals statically.
2. Any ideas what the four junk button names were supposed to be? They correlate with the "shape" buttons on Playstation controllers: "Triangle, Circle, X, and Square." I'm guessing the junk was something like Unicode (respectively: 0xA1F7, 0xA1F0, 0xA877, 0xA1F5). Does DirectInput support Unicode names for buttons? Just curious...

John
--
www.leftium.com


Attachment: MP-8866_name_variations.patch
Description: Binary data

Attachment: wjoydnu_c_fix_grammar.patch
Description: Binary data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/