Re: [AD] split_modex_screen

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


Evert Glebbeek wrote:
The reason I think the second alternative is better and more logical is... well, basically that it makes sense. There is no GFX_DIRECTX on UNIX, because it's a Windows driver. This surprises noone. But not all UNICES are the same, so why should there always be a define for a GFX_DGA driver? I would expect that not to be there if I were running Solaris, or had disabled it at configure time.

Not all Windows systems will have DirectX though, which would put GFX_DIRECTX in the same boat as GFX_DGA if DGA isn't present. The difference is, there's no way to do a configure check to disable GFX_DIRECTX on Windows (so all Windows drivers are available to use on Windows), so why shouldn't Unix behave the same?

Also, there's something else you need to consider, with Allegro Unix/Linux binaries. If the person compiling the binary doesn't have GFX_DGA capabilities, then that binary will never work with DGA, even if the end-user's library can handle it.

Personally, I think such code was broken to begin with as even prior to the removal of the driver it wasn't guarenteed to always be there.

I would say the opposite. If GFX_DGA is a Unix driver, it should always be available in Unix.. and there was nothing mentioning it may not be defined.

Not to mention that now programs that relied on the old behavior are now broken, as is clear with Allegro's own #ifdef GFX_MODEX problems.

But again, this part of the API was never clarrified, so who's to say which code is wrong? The docs never said drivers will always be, or may not be, defined.. and with such an ambiguity, we should follow what the other platforms do (define the drivers even if they're not available).

Besides, AFAIK split_modex_screen is the only public function that'll disappear if the platform doesn't support a specific GFX driver (which I think was a bigger error to begin with). But my patch should've also fixed that by defining a dummy function of that that does nothing if the platform supports Mode-X, but is otherwise unavailable (so if GFX_MODEX is defined, even if unuseable, split_modex_screen will still be present).




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