glx: Use g_set_error_literal() where appropriate
This commit is contained in:
parent
bed392b9a5
commit
0194e9db2f
@ -100,9 +100,9 @@ clutter_backend_glx_post_parse (ClutterBackend *backend,
|
|||||||
&backend_glx->error_base,
|
&backend_glx->error_base,
|
||||||
&backend_glx->event_base))
|
&backend_glx->event_base))
|
||||||
{
|
{
|
||||||
g_set_error (error, CLUTTER_INIT_ERROR,
|
g_set_error_literal (error, CLUTTER_INIT_ERROR,
|
||||||
CLUTTER_INIT_ERROR_BACKEND,
|
CLUTTER_INIT_ERROR_BACKEND,
|
||||||
"XServer appears to lack required GLX support");
|
"XServer appears to lack the required GLX support");
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -110,12 +110,16 @@ clutter_backend_glx_post_parse (ClutterBackend *backend,
|
|||||||
/* XXX: Technically we should require >= GLX 1.3 support but for a long
|
/* XXX: Technically we should require >= GLX 1.3 support but for a long
|
||||||
* time Mesa has exported a hybrid GLX, exporting extensions specified
|
* time Mesa has exported a hybrid GLX, exporting extensions specified
|
||||||
* to require GLX 1.3, but still reporting 1.2 via glXQueryVersion. */
|
* to require GLX 1.3, but still reporting 1.2 via glXQueryVersion. */
|
||||||
|
glx_major = 1;
|
||||||
|
glx_minor = 2;
|
||||||
if (!glXQueryVersion (backend_x11->xdpy, &glx_major, &glx_minor) ||
|
if (!glXQueryVersion (backend_x11->xdpy, &glx_major, &glx_minor) ||
|
||||||
!(glx_major == 1 && glx_minor >= 2))
|
!(glx_major == 1 && glx_minor >= 2))
|
||||||
{
|
{
|
||||||
g_set_error (error, CLUTTER_INIT_ERROR,
|
g_set_error (error, CLUTTER_INIT_ERROR,
|
||||||
CLUTTER_INIT_ERROR_BACKEND,
|
CLUTTER_INIT_ERROR_BACKEND,
|
||||||
"XServer appears to lack required GLX 1.2 support");
|
"XServer appears to lack the required GLX "
|
||||||
|
"1.2 support (%d.%d reported)",
|
||||||
|
glx_major, glx_minor);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -570,7 +574,7 @@ clutter_backend_glx_create_context (ClutterBackend *backend,
|
|||||||
|
|
||||||
if (!_clutter_backend_glx_get_fbconfig (backend_glx, &config))
|
if (!_clutter_backend_glx_get_fbconfig (backend_glx, &config))
|
||||||
{
|
{
|
||||||
g_set_error (error, CLUTTER_INIT_ERROR,
|
g_set_error_literal (error, CLUTTER_INIT_ERROR,
|
||||||
CLUTTER_INIT_ERROR_BACKEND,
|
CLUTTER_INIT_ERROR_BACKEND,
|
||||||
"Unable to find suitable fbconfig for the GLX context");
|
"Unable to find suitable fbconfig for the GLX context");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -585,7 +589,7 @@ clutter_backend_glx_create_context (ClutterBackend *backend,
|
|||||||
True);
|
True);
|
||||||
if (backend_glx->gl_context == NULL)
|
if (backend_glx->gl_context == NULL)
|
||||||
{
|
{
|
||||||
g_set_error (error, CLUTTER_INIT_ERROR,
|
g_set_error_literal (error, CLUTTER_INIT_ERROR,
|
||||||
CLUTTER_INIT_ERROR_BACKEND,
|
CLUTTER_INIT_ERROR_BACKEND,
|
||||||
"Unable to create suitable GL context");
|
"Unable to create suitable GL context");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -612,7 +616,7 @@ clutter_backend_glx_create_context (ClutterBackend *backend,
|
|||||||
xvisinfo = glXGetVisualFromFBConfig (xdisplay, config);
|
xvisinfo = glXGetVisualFromFBConfig (xdisplay, config);
|
||||||
if (xvisinfo == NULL)
|
if (xvisinfo == NULL)
|
||||||
{
|
{
|
||||||
g_set_error (error, CLUTTER_INIT_ERROR,
|
g_set_error_literal (error, CLUTTER_INIT_ERROR,
|
||||||
CLUTTER_INIT_ERROR_BACKEND,
|
CLUTTER_INIT_ERROR_BACKEND,
|
||||||
"Unable to retrieve the X11 visual");
|
"Unable to retrieve the X11 visual");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -665,7 +669,7 @@ clutter_backend_glx_create_context (ClutterBackend *backend,
|
|||||||
|
|
||||||
if (clutter_x11_untrap_x_errors ())
|
if (clutter_x11_untrap_x_errors ())
|
||||||
{
|
{
|
||||||
g_set_error (error, CLUTTER_INIT_ERROR,
|
g_set_error_literal (error, CLUTTER_INIT_ERROR,
|
||||||
CLUTTER_INIT_ERROR_BACKEND,
|
CLUTTER_INIT_ERROR_BACKEND,
|
||||||
"Unable to select the newly created GLX context");
|
"Unable to select the newly created GLX context");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user