diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2016-10-22 02:37:53 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2016-10-22 02:40:08 +0100 |
commit | 8e85f55240d4e3a2191c7945c7e76a6f20a4d32d (patch) | |
tree | e26b0c3447766eb2db99eaabb19c75924e792d7c /gdk/gdkglcontext.c | |
parent | 31c05771e957f2f54fb197a391b63e6ef3394a26 (diff) | |
download | gtk+-8e85f55240d4e3a2191c7945c7e76a6f20a4d32d.tar.gz |
gl: Check whether use_es is positive
Now that the use_es field is an int with a possible negative value, we
cannot use it its truth value directly; we need to check if it's a
positive value, instead.
Diffstat (limited to 'gdk/gdkglcontext.c')
-rw-r--r-- | gdk/gdkglcontext.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c index 06cae69e4e..f822fa876e 100644 --- a/gdk/gdkglcontext.c +++ b/gdk/gdkglcontext.c @@ -576,7 +576,7 @@ gdk_gl_context_set_required_version (GdkGLContext *context, /* Enforce a minimum context version number of 3.2 */ version = (major * 100) + minor; - if (priv->use_es || (_gdk_gl_flags & GDK_GL_GLES) != 0) + if (priv->use_es > 0 || (_gdk_gl_flags & GDK_GL_GLES) != 0) min_ver = 200; else min_ver = 302; @@ -612,7 +612,7 @@ gdk_gl_context_get_required_version (GdkGLContext *context, g_return_if_fail (GDK_IS_GL_CONTEXT (context)); - if (priv->use_es || (_gdk_gl_flags & GDK_GL_GLES) != 0) + if (priv->use_es > 0 || (_gdk_gl_flags & GDK_GL_GLES) != 0) { default_major = 2; default_minor = 0; |