From 24b12d626c3afdaa94b4119e218cf5b7436d0478 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Thu, 2 Sep 2010 16:22:45 +0100 Subject: [PATCH] cex100: Remove C99-ism We were declaring a variable in the middle of the code. Blasphemy, for non-c99 compilers. --- clutter/egl/clutter-backend-cex100.c | 33 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/clutter/egl/clutter-backend-cex100.c b/clutter/egl/clutter-backend-cex100.c index caf31a611..f5d64034c 100644 --- a/clutter/egl/clutter-backend-cex100.c +++ b/clutter/egl/clutter-backend-cex100.c @@ -154,22 +154,7 @@ clutter_backend_cex100_create_context (ClutterBackend *backend, EGLConfig configs[2]; EGLint config_count; EGLBoolean status; - - 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; + NativeWindowType window; EGLint cfg_attribs[] = { EGL_BUFFER_SIZE, EGL_DONT_CARE, EGL_RED_SIZE, 8, @@ -187,6 +172,22 @@ clutter_backend_cex100_create_context (ClutterBackend *backend, 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, configs, 2,