From: Brian Paul Date: Thu, 29 May 2008 23:02:31 +0000 (-0600) Subject: egl: added Name field to _EGLDriver so a driver name string can propogate up through... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c73b4ba86b424ba66a16c4006a57db505bd3ca3;p=mesa.git egl: added Name field to _EGLDriver so a driver name string can propogate up through EGL_VERSION string --- diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 3151b35156c..367787b243d 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -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; } diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h index b0a5fadf647..e0cedb22c35 100644 --- a/src/egl/main/egldriver.h +++ b/src/egl/main/egldriver.h @@ -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;