Re: [AD] Proposed clarification of get_gfx_mode_list |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
"Grzegorz Adam Hankiewicz" <gradha@xxxxxxxxxx> 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. 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(). the reason the mode-selector is acceptably
fast is due to some optimalisations (read: hacks) i put in there to avoid
redundant enumeration. before that IIRC on win32 (or was it dos?) it took 6
seconds to enumerate all modes on all fullscreen drivers. after hacks ->
closer to one second on my geforce 2 mx.
> 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),
??? all enumerated modes are supposed to be supported given there's enough
RAM on the gfx card. 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?
> even if you do that you cannot trust that the driver eventuall
> 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.
although putting the max. desktop resolution in a mode-list is not a pretty
thing, done differently it will be nice to have. you can for example put
windowed, max_width and max_height as struct members in GFX_MODE_LIST which
is IMO prettier.
i'll be happy to hear what ideas you have to improve the mode-list API.
i have considered making an extension to the mode list API to cover
enumeration of refresh rates and to possibly make use of the mode-lists to
simplify set_gfx_mode().
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.
Sincerely Henrik Stokseth.
-----------------------------------------------------------------------
E-mail: hstokset@xxxxxxxxxx Homepage: http://hstokset.n3.net