Re: [AD] Small problem with driver removals

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


> > Actually, the behaviour of whether driver constants are defined or not
> > has been the same since 4.0.0 (at least), so we're not breaking
> anything 
> > if your changes are reverted.
> The problem is that the docs never mentioned the driver defines 
> disappearing if Allegro is compiled without support for that driver. 
> Thusly, code which uses those defines without checking for them (which 
> there is no indication that they had to be, and I think is ugly anyway)
> is now broken. The fact that it's been this way pre-4.0 has no real 
> relevance.. we made changes to Allegro that causes valid Allegro 
> programs to break, so we should fix it.

I compiled the NES emulator that uses Allegro (it's on the depot, the name
doesn't spring to mind immedately). This failed to build because it was
using the GFX_DRIVER* constants explicitly to allow the user to select a
mode from the menu. I had to rip apart the code to get it to compile with
the latest version.
However, I think this is really a design flaw in the emulator rather than
in Allegro. It also used the DGA variables as regular UNIX drivers, while
in fact they're not.
If we go define all symbols of drivers that Allegro was not build with,
then shouldn't we define the DGA driver too on all flavours of UNIX? In
fact, if we're going to do that, what's the rationale in not defining the
DIRECTX driver symbols too? They'll fail when requested, of course, but the
symbol will be there.

For this latter reason, I've really always assumed that the driver symbols
are only defined when Allegro is build with the specific driver enabled.
Maybe we should rather document that the driver symbols are not defined if
Allegro is build without that driver than define them anyway.

Evert




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