Re: [AD] Touchscreen patch

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


On Mon, 2008-07-14 at 09:54 -0600, Trent Gamblin wrote:
> My touchscreen seems to add a mouse down and a mouse up event at the
> same time when tapping. The current code under Windows has all
> events being processed and then update_mouse() being called
> afterwards. All this patch does is put the update_mouse() calls into
> the loop so its called with every mouse event (so the mouse down
> isn't missed). The touchscreen now works in my allegro app and the
> regular mouse seems unaffected. Please, if someone could review the
> patch that knows more about the mouse driver.
> 

Looks right to me. So far, registering the DInput event callback
probably meant that the loop usually only had one item in it - i.e. if a
user pressed and release the button really quick, DInput would call the
handler two times with one item, instead of once with two items - so it
was not missed. I wouldn't be sure though, this might actually fix a
more general bug of short mouse clicks being lost under Windows :)

What I'm still wondering though is, even with the fix, won't some
Allegro 4 apps (all those not using mouse_callback) break regardless?
E.g. if someone only checks mouse_b 30 times per second, it will be very
unlikely to catch the pressed state with your touchpad, as I see it..

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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