From 49ed5bb28d501cd6751bd59dc25a60a4293bcd75 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 10 Jan 2011 12:39:46 +0800 Subject: targets/egl-static: New EGL target for scons. This target is based on and replaces egl-gdi. It is suitable for both windows and x11. --- src/egl/main/egldriver.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/egl') diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c index 62c5695513..46876d0056 100644 --- a/src/egl/main/egldriver.c +++ b/src/egl/main/egldriver.c @@ -141,9 +141,6 @@ _eglOpenLibrary(const char *driverPath, lib_handle *handle) if (!lib) { _eglLog(_EGL_WARNING, "Could not open driver %s (%s)", driverPath, error); - if (!getenv("EGL_DRIVER")) - _eglLog(_EGL_WARNING, - "The driver can be overridden by setting EGL_DRIVER"); return NULL; } @@ -467,6 +464,19 @@ _eglAddUserDriver(void) } +/** + * Add egl_gallium to the module array. + */ +static void +_eglAddGalliumDriver(void) +{ +#ifndef _EGL_BUILT_IN_DRIVER_GALLIUM + void *external = (void *) "egl_gallium"; + _eglPreloadForEach(_eglGetSearchPath(), _eglLoaderFile, external); +#endif +} + + /** * Add built-in drivers to the module array. */ @@ -491,14 +501,12 @@ _eglAddBuiltInDrivers(void) static EGLBoolean _eglAddDrivers(void) { - void *external = (void *) "egl_gallium"; - if (_eglModules) return EGL_TRUE; /* the order here decides the priorities of the drivers */ _eglAddUserDriver(); - _eglPreloadForEach(_eglGetSearchPath(), _eglLoaderFile, external); + _eglAddGalliumDriver(); _eglAddBuiltInDrivers(); return (_eglModules != NULL); -- cgit v1.2.3