Re: [AD] X11 unresponsiveness

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


Evert Glebbeek wrote:
Just to be sure I follow you correctly - you mean we could require
poll_keyboard() and poll_mouse() to be called regularly when using the sigalrm
version of the library?

Not quite. Polling wouldn't be 100% necessary. The input handler (unpatched for the signal version) would run as normal by default, but the various *_needs_poll functions would still return TRUE and when the corresponding poll_* function is called, that device is removed from the signal handler.

A potential problem I see with this is that it changes behavior of the library
on a platform that is already supported.

Not really. By default, the signal version would still work without being polled, but remain laggy. But once it starts being polled, the signal handler would no longer poll the device. The Allegro docs already state that once the poll_* function is called, you must continue to call it for the device to work.

If this works properly, I have no objections in principle, but then I do think
that keyboard_needs_poll() and mouse_needs_poll() should return FALSE on
platforms where it is not needed (such as the pthreads version of the library,
which already works fine with Elias's most recent patch) rather than forcing you
to poll even if it is not nescessary (which is the main reason I never liked
using them).

Of course. The pthreads version has been fixed to my satisfaction (which patch is being used currently though?) and doesn't need polling. But the signal version does to eliminate the potential lag.

I'd still prefer Allegro to handle the polling though, so I'd see it as a last
resort or easy way out. ;)

The signal input handler would continue behaving as it does in 4.1.14, AFAICS. The only difference will be that the various *_needs_poll fucntions would return true. :)

- Kitty Cat




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