[gtk+] gl: Fix the required version setter
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gl: Fix the required version setter
- Date: Tue, 10 Feb 2015 10:21:29 +0000 (UTC)
commit 5666522ab3d5073d5f1b6483d9354680d3ccb1ce
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Feb 10 10:16:53 2015 +0000
gl: Fix the required version setter
We don't allow a version tuple to be lower than (3, 2), but we should
allow versions above that.
https://bugzilla.gnome.org/show_bug.cgi?id=744212
gdk/gdkglcontext.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index dda1b61..5001c71 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -523,8 +523,21 @@ gdk_gl_context_set_required_version (GdkGLContext *context,
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
g_return_if_fail (!priv->realized);
+ /* this will take care of the default */
+ if (major == 0 && minor == 0)
+ {
+ priv->major = 0;
+ priv->minor = 0;
+ return;
+ }
+
priv->major = MAX (major, 3);
- priv->minor = MAX (minor, 2);
+
+ /* we only support versions ≥ 3.2 */
+ if (priv->major == 3)
+ priv->minor = MAX (minor, 2);
+ else
+ priv->minor = minor;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]