[AD] bug in src/win/wjoyw32.c |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
I have detect a bug in windows source, allegro last version.I explain the problem, but english not is very well. The original source (win/wjoyw32.c) only works if you have 1 joystick in Windows and this joy only have 8 buttons or less. This is great, the 95% of people have that configuration. But if you have 2 joys or some joy have more of 10 buttons the driver don't work. The driver limit the buttons number to 8 but don't limit the loop (->for(..;..;.){}) at button loop refresh, and the numbers of buttons are readed of windows 'caps'. This overwrite the struct. REPAIR The 2 joystick not work, simple, a little bug in sticks refresh. REPAIR And only find the 2 first joys in the Panel control joysticks IDs list of Windows but if the first joy is in the 3 ID? REPAIR I repair this bugs, and all work correctly. I found this bugs because I use DirectPad Pro to use SNES Pad in Windows and all tests and programs of allegro that use joystick not work. I am not a guru programmer, revise and compare my source and optimize. Thanks SASKPG _________________________________________________________ http://www.latinmail.com. Gratuito, latino y en español.
Attachment:
wjoyw32.zip
Description: Binary data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |