Charles Davis : winemac.drv: Don't bother storing the OpenGL version.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Feb 16 09:54:58 CST 2016


Module: wine
Branch: master
Commit: d8eac069402134364faf5ecafe4af51fbec9909e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d8eac069402134364faf5ecafe4af51fbec9909e

Author: Charles Davis <cdavis5x at gmail.com>
Date:   Mon Feb 15 01:49:02 2016 -0700

winemac.drv: Don't bother storing the OpenGL version.

Signed-off-by: Charles Davis <cdavis5x at gmail.com>
Signed-off-by: Ken Thomases <ken at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winemac.drv/opengl.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c
index a6f1440..ab79a82 100644
--- a/dlls/winemac.drv/opengl.c
+++ b/dlls/winemac.drv/opengl.c
@@ -44,7 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wgl);
 
 
 struct gl_info {
-    char *glVersion;
     char *glExtensions;
 
     char wglExtensions[4096];
@@ -1259,9 +1258,6 @@ static BOOL init_gl_info(void)
         return FALSE;
     }
 
-    str = (const char*)opengl_funcs.gl.p_glGetString(GL_VERSION);
-    gl_info.glVersion = HeapAlloc(GetProcessHeap(), 0, strlen(str) + 1);
-    strcpy(gl_info.glVersion, str);
     str = (const char*)opengl_funcs.gl.p_glGetString(GL_EXTENSIONS);
     length = strlen(str) + sizeof(legacy_extensions);
     if (allow_vsync)
@@ -1274,9 +1270,10 @@ static BOOL init_gl_info(void)
 
     opengl_funcs.gl.p_glGetIntegerv(GL_MAX_VIEWPORT_DIMS, gl_info.max_viewport_dims);
 
-    TRACE("GL version   : %s\n", gl_info.glVersion);
+    str = (const char*)opengl_funcs.gl.p_glGetString(GL_VERSION);
+    sscanf(str, "%u.%u", &gl_info.max_major, &gl_info.max_minor);
+    TRACE("GL version   : %s\n", str);
     TRACE("GL renderer  : %s\n", opengl_funcs.gl.p_glGetString(GL_RENDERER));
-    sscanf(gl_info.glVersion, "%u.%u", &gl_info.max_major, &gl_info.max_minor);
 
     CGLSetCurrentContext(old_context);
     CGLReleaseContext(context);




More information about the wine-cvs mailing list