[AD] About the Win2k bug |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
I've been working on the Win2k bug for some time now and, while I recently made some progress, I'm a little pessimistic: I think more and more that the bug is deeply rooted in the structure of the Windows port itself. Allegro uses DirectInput to handle the keyboard but DirectInput doesn't allow exclusive access to it, meaning that the traditional key messages are still sent to the application main message loop. So basically they are two key message flows. Now, Allegro uses two separate threads to handle these flows: the main message loop thread and the keyboard thread. I think the problem originates in a bad synchronization between them, that happens largely behind the scene. I tried several things, from minor fixes to more radical ones (blocking the normal key message flow) but unfortunately none of them worked. So (and if no one disagrees) I'm going to make WinAllegro revert to a more traditional scheme: using a single thread for all the inputs (general purpose messages, keyboard, mouse). Hopefully this will kill the bug. Meantime, here's a patch that seems to improve a little the stability under Win2k (thanks to Paul Pridham and Markus Ewald for pointing that out). -- Eric Botcazou ebotcazou@xxxxxxxxxx
Attachment:
wwnd2.zip
Description: Zip compressed data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |