egl: fixes for Windows
authorJonathan White <jwhite@tungstengraphics.com>
Wed, 6 Aug 2008 22:37:49 +0000 (16:37 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 6 Aug 2008 22:37:49 +0000 (16:37 -0600)
src/egl/main/egldriver.c
src/egl/main/egllog.c

index f5edb58f4334b00c5806a1ac919aef534639f8dd..43b1f519034b75793ce120d00b328bc7e767857f 100644 (file)
@@ -146,10 +146,12 @@ _eglChooseDriver(_EGLDisplay *dpy)
 
    (void) DefaultDriverName;
 
+#if defined(_EGL_PLATFORM_X)
    /* First, if the EGL_DRIVER env var is set, use that */
    driverName = getenv("EGL_DRIVER");
    if (driverName)
       return _eglstrdup(driverName);
+#endif
 
 #if 0
    if (!displayString) {
@@ -217,7 +219,8 @@ _eglOpenDriver(_EGLDisplay *dpy, const char *driverName, const char *args)
 
 #if defined(_EGL_PLATFORM_WINDOWS)
 /* Use static linking on Windows for now */
-#ifdef WINDOWS_STATIC_LINK   
+#ifdef WINDOWS_STATIC_LINK
+   lib = 0;
    mainFunc = (_EGLMain_t)_eglMain;
 #else
    /* XXX untested */
index 23eb523eebe462e776a5cdbe03740fc1e7341228..1d7a0a388c6923c88cacf782833b47c1944ccf9d 100644 (file)
@@ -21,7 +21,11 @@ static EGLint ReportingLevel = -1;
 static void
 log_level_initialize(void)
 {
+#if defined(_EGL_PLATFORM_X)  
    char *log_env = getenv("EGL_LOG_LEVEL");
+#else
+   char *log_env = NULL;
+#endif
 
    if (log_env == NULL) {
       ReportingLevel = FALLBACK_LOG_LEVEL;