cex100: Remove C99-ism
authorDamien Lespiau <damien.lespiau@intel.com>
Thu, 2 Sep 2010 15:22:45 +0000 (16:22 +0100)
committerDamien Lespiau <damien.lespiau@intel.com>
Fri, 3 Sep 2010 10:14:05 +0000 (11:14 +0100)
We were declaring a variable in the middle of the code. Blasphemy, for
non-c99 compilers.

clutter/egl/clutter-backend-cex100.c

index caf31a6..f5d6403 100644 (file)
@@ -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,