Re: [AD] CPU info changes

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


>
>Martijn's idea seems a bit hackish, hooking over another API for something 
>completely (IMO) unrelated. Now, if the rest of Allegro worked that way 
>(al_read_config("desktop width", w) for example) then it would make sense.
>Then again, maybe for Allegro 5.0...
>
It *is* a bit hackish ;-) but the code is already there, and the # sections were
developed exactly for this sort of situation (actually they were added as a way
for addon libs to pass version info in a standardised way, but it never got
very popular). For a # section you don't need to write all sorts of hook functions:
you just let check_cpu use set_config_string("#cpuinfo", "family", "i386") for example.

I agree it is a bit different from the way the rest of allegro works, but it is exactly
the extensible name-value pairs that were suggested.
The advantage is that you don't need to fill in all fields for each cpu, since the
config routines are very good at handling defaults.

-- 

Martijn Versteegh



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