cex100: Remove C99-ism

We were declaring a variable in the middle of the code. Blasphemy, for
non-c99 compilers.
This commit is contained in:
Damien Lespiau 2010-09-02 16:22:45 +01:00
parent 0216f0b281
commit 24b12d626c

View File

@ -154,22 +154,7 @@ clutter_backend_cex100_create_context (ClutterBackend *backend,
EGLConfig configs[2]; EGLConfig configs[2];
EGLint config_count; EGLint config_count;
EGLBoolean status; EGLBoolean status;
NativeWindowType window;
if (backend_egl->egl_context != EGL_NO_CONTEXT)
return TRUE;
CLUTTER_NOTE (BACKEND, "Using the %s plane", gdl_get_plane_name (gdl_plane));
/* Start by initializing the GDL plane */
if (!gdl_plane_init (GDL_DISPLAY_ID_0, gdl_plane, GDL_PF_ARGB_32))
{
g_set_error (error, CLUTTER_INIT_ERROR,
CLUTTER_INIT_ERROR_BACKEND,
"Could not initialize the GDL plane");
return FALSE;
}
NativeWindowType window = (NativeWindowType) gdl_plane;
EGLint cfg_attribs[] = { EGLint cfg_attribs[] = {
EGL_BUFFER_SIZE, EGL_DONT_CARE, EGL_BUFFER_SIZE, EGL_DONT_CARE,
EGL_RED_SIZE, 8, EGL_RED_SIZE, 8,
@ -187,6 +172,22 @@ clutter_backend_cex100_create_context (ClutterBackend *backend,
EGL_NONE EGL_NONE
}; };
if (backend_egl->egl_context != EGL_NO_CONTEXT)
return TRUE;
CLUTTER_NOTE (BACKEND, "Using the %s plane", gdl_get_plane_name (gdl_plane));
/* Start by initializing the GDL plane */
if (!gdl_plane_init (GDL_DISPLAY_ID_0, gdl_plane, GDL_PF_ARGB_32))
{
g_set_error (error, CLUTTER_INIT_ERROR,
CLUTTER_INIT_ERROR_BACKEND,
"Could not initialize the GDL plane");
return FALSE;
}
window = (NativeWindowType) gdl_plane;
status = eglGetConfigs (backend_egl->edpy, status = eglGetConfigs (backend_egl->edpy,
configs, configs,
2, 2,