mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 19:12:04 +00:00
2007-04-07 Matthew Allum <mallum@openedhand.com>
* clutter/glx/clutter-backend-glx.c: Fix version check.
This commit is contained in:
parent
3944495569
commit
0085b75610
@ -124,30 +124,11 @@ clutter_backend_glx_post_parse (ClutterBackend *backend,
|
|||||||
static gboolean
|
static gboolean
|
||||||
is_gl_version_at_least_12 (void)
|
is_gl_version_at_least_12 (void)
|
||||||
{
|
{
|
||||||
#define NON_VENDOR_VERSION_MAX_LEN 32
|
/* FIXME: This likely needs to live elsewhere in features */
|
||||||
gchar non_vendor_version[NON_VENDOR_VERSION_MAX_LEN];
|
return
|
||||||
const gchar *version;
|
(g_ascii_strtod ((const gchar*) glGetString (GL_VERSION), NULL) >= 1.2);
|
||||||
gint i = 0;
|
|
||||||
|
|
||||||
version = (const gchar*) glGetString (GL_VERSION);
|
|
||||||
|
|
||||||
while ( ((version[i] <= '9' && version[i] >= '0') || version[i] == '.')
|
|
||||||
&& i < NON_VENDOR_VERSION_MAX_LEN)
|
|
||||||
{
|
|
||||||
non_vendor_version[i] = version[i];
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
non_vendor_version[i] = '\0';
|
|
||||||
|
|
||||||
if (strstr (non_vendor_version, "1.0") == NULL &&
|
|
||||||
strstr (non_vendor_version, "1.0") == NULL)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_backend_glx_init_stage (ClutterBackend *backend,
|
clutter_backend_glx_init_stage (ClutterBackend *backend,
|
||||||
GError **error)
|
GError **error)
|
||||||
|
Loading…
Reference in New Issue
Block a user