[PATCH 1/4] opengl32: Check the minor version when determining extension support.

Alex Henrie alexhenrie24 at gmail.com
Thu Oct 29 22:30:19 CDT 2015


Cc: Roderick Colenbrander <thunderbird2k at gmail.com>
Cc: Rico Schüller <kgbricola at web.de>

The second half of the condition was never evaluated, and it does not
make sense to say that an extension is supported if (for example) it is
part of OpenGL 4.2 but the driver only supports OpenGL 4.1.

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 dlls/opengl32/wgl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 9482c75..acfb243 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -827,7 +827,7 @@ static BOOL is_extension_supported(const char* extension)
 
             /* Compare the major/minor version numbers of the native OpenGL library and what is required by the function.
              * The gl_version string is guaranteed to have at least a major/minor and sometimes it has a release number as well. */
-            if( (gl_version[0] >= version[0]) || ((gl_version[0] == version[0]) && (gl_version[2] >= version[2])) ) {
+            if( (gl_version[0] > version[0]) || ((gl_version[0] == version[0]) && (gl_version[2] >= version[2])) ) {
                 return TRUE;
             }
             WARN("The function requires OpenGL version '%c.%c' while your drivers only provide '%c.%c'\n", version[0], version[2], gl_version[0], gl_version[2]);
-- 
2.6.2




More information about the wine-patches mailing list