RE: [AD] 4.3 graphic drivers |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Fri, 2005-11-11 at 09:59 +0000, Vincent Penecherc'h wrote:
> A side note to this discussion, not on the vtables themselves
> but on what comes just before them:
>
> struct DRIVER {
> int id; /* driver ID code */
> AL_CONST char *name; /* driver name */
> AL_CONST char *desc; /* description string */
> AL_CONST char *ascii_name; /* ASCII format name string */
> };
>
> That would be a nice thing to have when dealing with a list of
> drivers you do not know the type of.
> One would have to make sure all drivers always have such starting
> members though (which is always the case at present I think).
Yes, I think that's a good idea. An alternative would be, have a vtable
entry "get_driver_info" for each driver, which would fill in a struct
like above.
This thread had a similiar idea:
http://sourceforge.net/mailarchive/message.php?msg_id=11076650
(And the SF search is really broken.)
--
Elias Pschernig