mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
renderer: Make COGL_RENDERER / COGL_DRIVER env. variables case insensitive
This will make it much more user friendly :-) Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
dd75926c1a
commit
6e37cebc7a
@ -222,7 +222,7 @@ _cogl_renderer_choose_driver (CoglRenderer *renderer,
|
|||||||
driver_name = _cogl_config_driver;
|
driver_name = _cogl_config_driver;
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GL
|
#ifdef HAVE_COGL_GL
|
||||||
if (driver_name == NULL || !strcmp (driver_name, "gl"))
|
if (driver_name == NULL || !g_ascii_strcasecmp (driver_name, "gl"))
|
||||||
{
|
{
|
||||||
renderer->driver = COGL_DRIVER_GL;
|
renderer->driver = COGL_DRIVER_GL;
|
||||||
libgl_name = COGL_GL_LIBNAME;
|
libgl_name = COGL_GL_LIBNAME;
|
||||||
@ -231,7 +231,7 @@ _cogl_renderer_choose_driver (CoglRenderer *renderer,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GLES2
|
#ifdef HAVE_COGL_GLES2
|
||||||
if (driver_name == NULL || !strcmp (driver_name, "gles2"))
|
if (driver_name == NULL || !g_ascii_strcasecmp (driver_name, "gles2"))
|
||||||
{
|
{
|
||||||
renderer->driver = COGL_DRIVER_GLES2;
|
renderer->driver = COGL_DRIVER_GLES2;
|
||||||
libgl_name = COGL_GLES2_LIBNAME;
|
libgl_name = COGL_GLES2_LIBNAME;
|
||||||
@ -240,7 +240,7 @@ _cogl_renderer_choose_driver (CoglRenderer *renderer,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GLES
|
#ifdef HAVE_COGL_GLES
|
||||||
if (driver_name == NULL || !strcmp (driver_name, "gles1"))
|
if (driver_name == NULL || !g_ascii_strcasecmp (driver_name, "gles1"))
|
||||||
{
|
{
|
||||||
renderer->driver = COGL_DRIVER_GLES1;
|
renderer->driver = COGL_DRIVER_GLES1;
|
||||||
libgl_name = COGL_GLES1_LIBNAME;
|
libgl_name = COGL_GLES1_LIBNAME;
|
||||||
@ -308,7 +308,8 @@ cogl_renderer_connect (CoglRenderer *renderer, GError **error)
|
|||||||
char *user_choice = getenv ("COGL_RENDERER");
|
char *user_choice = getenv ("COGL_RENDERER");
|
||||||
if (!user_choice)
|
if (!user_choice)
|
||||||
user_choice = _cogl_config_renderer;
|
user_choice = _cogl_config_renderer;
|
||||||
if (user_choice && strcmp (winsys->name, user_choice) != 0)
|
if (user_choice &&
|
||||||
|
g_ascii_strcasecmp (winsys->name, user_choice) != 0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user