Re: [AD] get_volume()

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


On Thu, 2005-03-03 at 11:48 +0100, Andrei Ellman wrote:

> 
> While on the subject of adding get_xxx methods, another handy method 
> would be to get the current graphics driver that is set with 
> set_gfx_mode()'s 'card' parameter. If set_gfx_mode() is called with one 
> of the magic drivers such as GFX_AUTODETECT, there is currently no way 
> of knowing what driver is installed. The function get_gfx_mode_list(int 
> card) requires a real driver and not a magic driver for the 'card' 
> paramater, so if you want to know what resolutions are available using 
> the current driver, you would have to set the graphics mode without 
> using a magic driver and remember the driver-ID.
> 

You can get it with gfx_driver->id currently.

I think, we should just add a function like this:

AL_DRIVER_INFO *al_get_driver_info(driver), where driver can be:

AL_SYSTEM_DRIVER
AL_GFX_DRIVER
AL_DIGI_DRIVER
AL_JOYSTICK_DRIVER
AL_TIMER_DRIVER
AL_MIDI_DRIVER
and so on..

And struct AL_DRIVER_INFO
{
    AL_ID id;
    char const *name;
    char const *description;
    possibly more info?
}

That way, we need no separate is_gfx_driver_installed and
get_gfx_driver_id functions, which, when done for all drivers, would
clutter the API quite a bit.

-- 
Elias Pschernig





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