Load the default module set when no Module section is given in the config.

Also, synchronize that list with the list for the pseudoconfig file used
when starting with no config file.  These really need to be better unified.
This commit is contained in:
Adam Jackson 2006-09-14 19:03:32 -04:00
parent beac2bf1e4
commit 739224d05e
2 changed files with 18 additions and 3 deletions

View File

@ -48,6 +48,9 @@
"\tLoad\t\"dbe\"\n" \
"\tLoad\t\"glx\"\n" \
"\tLoad\t\"freetype\"\n" \
"\tLoad\t\"type1\"\n" \
"\tLoad\t\"record\"\n" \
"\tLoad\t\"dri\"\n" \
"EndSection\n\n"
#define BUILTIN_DEVICE_NAME \

View File

@ -63,7 +63,7 @@
#include "xf86Config.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
#include "configProcs.h"
#include "globals.h"
#include "extension.h"
@ -280,9 +280,21 @@ xf86ModulelistFromConfig(pointer **optlist)
count++;
modp = (XF86LoadPtr) modp->list.next;
}
} else {
xf86configptr->conf_modules = xnfcalloc(1, sizeof(XF86ConfModuleRec));
}
if (count == 0) {
XF86ConfModulePtr ptr = xf86configptr->conf_modules;
ptr = xf86addNewLoadDirective(ptr, "extmod", XF86_LOAD_MODULE, NULL);
ptr = xf86addNewLoadDirective(ptr, "dbe", XF86_LOAD_MODULE, NULL);
ptr = xf86addNewLoadDirective(ptr, "glx", XF86_LOAD_MODULE, NULL);
ptr = xf86addNewLoadDirective(ptr, "freetype", XF86_LOAD_MODULE, NULL);
ptr = xf86addNewLoadDirective(ptr, "type1", XF86_LOAD_MODULE, NULL);
ptr = xf86addNewLoadDirective(ptr, "record", XF86_LOAD_MODULE, NULL);
ptr = xf86addNewLoadDirective(ptr, "dri", XF86_LOAD_MODULE, NULL);
count = 7;
}
if (count == 0)
return NULL;
/*
* allocate the memory and walk the list again to fill in the pointers