From 739224d05eb4f356c9cab9dcb8a44a8d78287765 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 14 Sep 2006 19:03:32 -0400 Subject: [PATCH] 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. --- hw/xfree86/common/xf86AutoConfig.c | 3 +++ hw/xfree86/common/xf86Config.c | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index 4dcc997c1..4f6a98aef 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -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 \ diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index f89db67fc..fe55c8cc4 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -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