Re: [AD] Proposed clarification of get_gfx_mode_list |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Fri, Mar 15, 2002 at 04:21:36PM +0100, Henrik Stokseth wrote:
> > 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.
>
> butter on meat. the user can EASILY do that himself.
Today with 4.0.x I write: get_gfx_mode_list(GFX_FBCON) and so on for
each known driver. But 4.2.x includes three new drivers, each for a
different platform, and my code won't use them, because I didn't know
them beforehand. And if I modify the code just to take advantage of
these few drivers, it won't compile with 4.0.x, which is a shame If I
just want those new drivers and can't link with previous 4.0.x DLLs.
I'm not saying that getting mode lists for all drivers is difficult,
I'm saying it's not scalable(?) to the future. I was planning on writting
some custom weird graphic driver just for experimentation and inserting
it as a graphic module under linux. Default code would not locate it,
and the nice thing would be for already written programs to use it.
> enumerating modes take a lot of time (computer-wise) and that's in
> most cases an unwanted delay since the user will typically decide on
> a driver to use and then which gfx mode from get_gfx_mode_list().
I understand, maybe the best would be a fast get_gfx_available_drivers
and then let the user call get_gfx_mode_list for the interesting drivers?
> there's no other way to be "sure" than to actually try
> the mode. are you thinking about storing the mode-info in a configuration
> file or so, for later use?
This would be possible if it could be dealt by Allegro's setup
tool. However, I was talking about drivers like fbcon, which depend on an
external file. At the moment fbcon doesn't implement get_gfx_mode_list,
but if it could, it would read that external file. If I am malicious I
could write wrong values there. If I am lazy I can change video card or
disable fbcon and forget about that file for some time, until Allegro
programs crashed.
> i don't know if i'll get the time to implement it though, as i'll be
> more or less gone for 14 months.
I wish that was the length of holidays.
--
Grzegorz Adam Hankiewicz gradha@xxxxxxxxxx http://gradha.infierno.org/