Re: [AD] [TODO] graphics mode selector |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Eric Botcazou <ebotcazou@xxxxxxxxxx> wrote:
> About 'gfx_mode_select* should use get_gfx_mode_list when available'...
>
> I can think of two ways of doing that:
> - we simply check against the gfx mode list that the resolution is valid;
if
> not, we display a nice popup box with a "Try again" message,
that's not what i had in mind. it's not much of a change from the current
system and IMHO not worth the work to implement it.
> - we dynamically change the contents of list boxes: for the simple
> gfx_mode_select(), we change the list of resolutions according to the
> selected gfx driver, for the extended gfx_mode_select_ex() we'll have to
> choose between driver->depth->resolution or driver->resolution->depth.
that's more like it. some elaboration explaining my current proposal
follows:
- to have a second std_gfx_mode_list list pointer which points to a list of
the typical 'standard' modes which you can already select from the
gfx_mode_select* function and use this when get_gfx_mode_list is not
supported for the given driver. a clean solution which relies only upon mode
lists.
- remove the current system where you select a driver, resolution and
eventually color-depth. this should be replace with a driver selection
dialog and a combined resolution/color-depth dialog made from the mode
lists. i suppose i could provide a flag to switch between the old and the
new methods if that would be preferred among some users.
- mode lists could be pre-fetched and stored in memory (and later freed upon
exit from gfx_mode_select*)... that depends on how fast a get_gfx_mode_list
can be done. i doubt it will be neccessary though.
- the possibility to input custom resolution for windowed drivers, perhaps?
(not important)
> Either way, it seems evident to me that the three autodetected drivers
that
> get listed at the top of the list don't fit at all into this plan and,
after
> thinking a little more about that, I'm now wondering: what are they listed
> in the mode selector for ?
we still need them as not all drivers support gfx_get_mode_list(). a way to
select resolution and color-depth but leaving the job of choosing a capable
gfx driver to allegro.
anyway, this is a rewrite which will (!) be done. therefore i need some
feedback. aside from the general redesign, what options will be worth
having/keeping and are there some things i didn't think of?
-henrik