egl: added Name field to _EGLDriver so a driver name string can propogate up through...
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 29 May 2008 23:02:31 +0000 (17:02 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 29 May 2008 23:04:24 +0000 (17:04 -0600)
src/egl/main/eglapi.c
src/egl/main/egldriver.h

index 3151b35156c8e4acbeaebbf6282cb63e3896397e..367787b243d364f723928b27abb2ec34105ec998 100644 (file)
@@ -81,7 +81,8 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
 
       dpyPriv->Driver->APImajor = *major;
       dpyPriv->Driver->APIminor = *minor;
-      sprintf(dpyPriv->Driver->Version, "%d.%d", *major, *minor);
+      snprintf(dpyPriv->Driver->Version, sizeof(dpyPriv->Driver->Version),
+               "%d.%d (%s)", *major, *minor, dpyPriv->Driver->Name);
 
       return retVal;
    }
index b0a5fadf6473a0ed4d577135647c0371d24e61ed..e0cedb22c35977148fc6809b8423504a415ef3e7 100644 (file)
@@ -28,8 +28,10 @@ struct _egl_driver
 
    void *LibHandle; /**< dlopen handle */
 
+   const char *Name;  /**< name of this driver */
+
    int APImajor, APIminor; /**< as returned by eglInitialize() */
-   char Version[10];       /**< initialized from APImajor/minor */
+   char Version[1000];       /**< initialized from APImajor/minor, Name */
 
    const char *ClientAPIs;