summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-05-12 16:40:29 +0200
committerMarek Olšák <[email protected]>2015-06-05 19:44:33 +0200
commit0e4b564ef288159f16f7a6886b6cfc0110411af8 (patch)
tree44ad16534094cc4aa99176427fb4f8f1bf31a548
parentefda9c56491f5cb90e77f5fe7979477fc9b2b529 (diff)
egl: combine VersionMajor and VersionMinor into one variable
Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
-rw-r--r--src/egl/main/eglapi.c9
-rw-r--r--src/egl/main/egldisplay.h3
2 files changed, 5 insertions, 7 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 9a17f8d31f2..81be6f9943b 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -410,8 +410,7 @@ _eglCreateAPIsString(_EGLDisplay *dpy)
static void
_eglComputeVersion(_EGLDisplay *disp)
{
- disp->VersionMajor = 1;
- disp->VersionMinor = 4;
+ disp->Version = 14;
}
/**
@@ -454,14 +453,14 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
_eglCreateExtensionsString(disp);
_eglCreateAPIsString(disp);
_eglsnprintf(disp->VersionString, sizeof(disp->VersionString),
- "%d.%d (%s)", disp->VersionMajor, disp->VersionMinor,
+ "%d.%d (%s)", disp->Version / 10, disp->Version % 10,
disp->Driver->Name);
}
/* Update applications version of major and minor if not NULL */
if ((major != NULL) && (minor != NULL)) {
- *major = disp->VersionMajor;
- *minor = disp->VersionMinor;
+ *major = disp->Version / 10;
+ *minor = disp->Version % 10;
}
RETURN_EGL_SUCCESS(disp, EGL_TRUE);
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index bb394ec2962..bc8cc7d6319 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -153,8 +153,7 @@ struct _egl_display
/* these fields are set by the driver during init */
void *DriverData; /**< Driver private data */
- EGLint VersionMajor; /**< EGL major version */
- EGLint VersionMinor; /**< EGL minor version */
+ EGLint Version; /**< EGL version major*10+minor */
EGLint ClientAPIs; /**< Bitmask of APIs supported (EGL_xxx_BIT) */
_EGLExtensions Extensions; /**< Extensions supported */