Re: [AD] 4.2.0 Beta 3 woes

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


On Thu, 2005-06-02 at 17:26 -0700, Chris wrote:

> Isn't GFX_HAS_VGA internal? That's one of the reasons why I made it so 
> platform specific drivers are always defined for their given
> platform, 
> regardless of useability, to lessen the use of define-dependant code.

I agree, ideally, there would be no need to know what drivers are
defined at compile time. But the way it currently works, you just need
them sometimes.

> The problem is modex.c's #if-checking.. it's an absolute mess and nearly 
> impossible to account for all cases (so as to make sure the function is 
> compiled to do nothing instead of skipped out-right). And on top of the 
> different cases,that code is compiled twice (once for the base lib, and 
> again for the module) so it becomes that much harder to avoid 
> duplicating the function. Plus, it seems non-Linux can't have VGA/ModeX 
> in a module so it has that special case too.
> 

So, removing that one check, as I said in my previous post, should fix
it. I attached a patch.

About the modules, I don't know as well. I assume, the #define magic
somehow makes the linker find the files, although they really are
defined inside the module. Actually, it doesn't make sense.. I realize I
have no idea how modules work :P

--
Elias Pschernig
Index: src/misc/modex.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/misc/modex.c,v
retrieving revision 1.33
diff -u -p -r1.33 modex.c
--- src/misc/modex.c	25 Jan 2005 23:25:54 -0000	1.33
+++ src/misc/modex.c	3 Jun 2005 07:44:50 -0000
@@ -33,7 +33,7 @@
    #include ALLEGRO_INTERNAL_HEADER
 #endif
 
-#if (!defined ALLEGRO_LINUX) || ((defined ALLEGRO_LINUX_VGA) && ((!defined ALLEGRO_WITH_MODULES) || (defined ALLEGRO_MODULE)))
+#if (!defined ALLEGRO_LINUX) || (!defined ALLEGRO_WITH_MODULES) || (defined ALLEGRO_MODULE)
 
 
 


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