RE: [AD] EVDEV mouse driver

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


Title: RE: [AD] EVDEV mouse driver


As you suggested, i've re-written the mouse detection in the setup using select
(I didn't use it at first because i didn't thought of it).

> Do you mean that mouse A, after having been flushed by the first iteration of
> the loop, might be moved during the second iteration of the loop when mouse
> B is being flushed, and thus might end up being _not_ flushed after the
> whole loop? If so, yes, that makes sense.

This can happen, but it is not the problem i have.

I simply described what I saw, I didn't understand what happened. I still
don't, but I can describe more precisely: it seems that no data can be read
during the flushing loop, even when there are data to be read (i.e. select
returns 0).  But data is correctly read during the next loop (for (count = 0;
...).

Noting that one of the functions called between the two loops is vsync, I've
tried some poke and hope programing.  It seems that calling vsync before the
flush loop makes this loop able to read the devices, sometimes, apparently
depending on the exact place of the vsync. Is the problem due to some subtle
interaction between timer and select ? (I'm using Allegro 4.1.9 with sigalarm
and fbcon without vsync, glibc 2.2.4)

Either that, or I've made a very stupid bug somewhere: it's the first time I
use select.

Anyway, the flush loop doesn't usually discard much data (when it works): at
most a few bytes for my lps2 mouse and at most two events (32 bytes) for the
tablet.

--
Annie

 

Attachment: setup_select.diff
Description: Binary data



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