From 1c73b4ba86b424ba66a16c4006a57db505bd3ca3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 29 May 2008 17:02:31 -0600 Subject: [PATCH] egl: added Name field to _EGLDriver so a driver name string can propogate up through EGL_VERSION string --- src/egl/main/eglapi.c | 3 ++- src/egl/main/egldriver.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) 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; -- 2.30.2