Re: [AD] Proposed clarification of get_gfx_mode_list

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


On Tue, Mar 12, 2002 at 11:09:45PM +0100, Eric Botcazou wrote:
> > It doesn't seem to fulfill the task of helping out the programmer, rather
> > seems to ask for writting lot's of #ifdef'ed code for each
> > driver/platform...
> 
> I agree from a platform-independent point of view, although we could make
> "official" the use of
> 
>    /* ask the system driver for a list of graphics hardware drivers */
>    if (system_driver->gfx_drivers)
>       list_entry = system_driver->gfx_drivers();
>    else
>       list_entry = _gfx_driver_list;
> 
> Do you have any suggestion to fix that ?

I guess, but not so useful for 4.x series since they would
involve changing the API. get_gfx_mode_list cound be turned into
get_gfx_mode_lists (note last character) and return a tree of available
physical drivers, each with the list returned by get_gfx_mode_list.

Each driver "leaf" would contain extra useful information like: can
the resolution list be trusted to work (useful for drivers which don't
really know until they try the mode), if the driver works in windowed
modes (here the resolution list should be a single entry with the size
of the desktop, since you can request weird modes like 666x666 if they
are smaller than desktop), maybe suggested fastest resolution, and more
I can't imagine now.

Looping through a list of available drivers is always better than having
to know them beforehand.

-- 
 Grzegorz Adam Hankiewicz   gradha@xxxxxxxxxx   http://gradha.infierno.org/



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