Re: [AD] event source casts

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


On Tue, 2009-08-04 at 00:20 +1000, Peter Wang wrote:
> 
> A couple of comments.
> 
> 1.  al_register_event_source(queue,
> 	al_get_keyboard_event_source(al_get_keyboard()));
> 
> is a bit silly since al_get_keyboard() has no other use any more.
> Same with al_get_mouse().

As before with the cast.

> 
> 2.  This change introduces some confusion about the `source' fields in
> ALLEGRO_EVENTs.  If I have a display event will the event source field
> point to the ALLEGRO_DISPLAY object, or the
> al_get_display_event_source(display)?
> 

True. What are the use-cases of the source field? In your specific
example I think ALLEGRO_DISPLAY_EVENT itself needs another field
"ALLEGRO_DISPLAY *display" which tells from which display the event
originated.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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