[cogl/cogl-1.14] win32: Minor build fixes for building for win32



commit fc86d0e12e3b0559ceae74f6f66690466a668fa4
Author: Neil Roberts <neil linux intel com>
Date:   Thu Feb 21 15:10:15 2013 +0000

    win32: Minor build fixes for building for win32
    
    This fixes some minor errors and warnings that were preventing Cogl
    building with mingw32:
    
    • cogl-framebuffer-gl.c was not including cogl-texture-private.h.
      Presumably something else ends up including that when building for
      GLX.
    
    • The WGL winsys was not including cogl-error-private.h
    
    • A call to strsplit in the WGL winsys was wrong.
    
    • For some reason the test-wrap-rectangle-textures test was trying to
      include the GDKPixbuf header.
    
    Reviewed-by: Robert Bragg <robert linux intel com>
    
    (cherry picked from commit 5380343399f834d9f96ca3b137d49c9c2193900a)

 cogl/driver/gl/cogl-framebuffer-gl.c         |    1 +
 cogl/winsys/cogl-winsys-wgl.c                |   12 ++++++------
 tests/conform/test-wrap-rectangle-textures.c |    1 -
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/driver/gl/cogl-framebuffer-gl.c
index 12eed43..18c9371 100644
--- a/cogl/driver/gl/cogl-framebuffer-gl.c
+++ b/cogl/driver/gl/cogl-framebuffer-gl.c
@@ -33,6 +33,7 @@
 #include "cogl-buffer-gl-private.h"
 #include "cogl-error-private.h"
 #include "cogl-texture-gl-private.h"
+#include "cogl-texture-private.h"
 
 #include <glib.h>
 #include <string.h>
diff --git a/cogl/winsys/cogl-winsys-wgl.c b/cogl/winsys/cogl-winsys-wgl.c
index e6686d8..33e7ad2 100644
--- a/cogl/winsys/cogl-winsys-wgl.c
+++ b/cogl/winsys/cogl-winsys-wgl.c
@@ -45,6 +45,7 @@
 #include "cogl-feature-private.h"
 #include "cogl-win32-renderer.h"
 #include "cogl-winsys-wgl-private.h"
+#include "cogl-error-private.h"
 
 typedef struct _CoglRendererWgl
 {
@@ -416,8 +417,8 @@ create_window_class (CoglDisplay *display, CoglError **error)
   if (wgl_display->window_class == 0)
     {
       _cogl_set_error (error, COGL_WINSYS_ERROR,
-                   COGL_WINSYS_ERROR_CREATE_CONTEXT,
-                   "Unable to register window class");
+                       COGL_WINSYS_ERROR_CREATE_CONTEXT,
+                       "Unable to register window class");
       return FALSE;
     }
 
@@ -617,7 +618,8 @@ update_winsys_features (CoglContext *context, CoglError **error)
 
   if (wgl_extensions)
     {
-      char **split_extensions = g_strsplit (wgl_extensions);
+      char **split_extensions =
+        g_strsplit (wgl_extensions, " ", 0 /* max_tokens */);
 
       COGL_NOTE (WINSYS, "  WGL Extensions: %s", wgl_extensions);
 
@@ -644,9 +646,7 @@ update_winsys_features (CoglContext *context, CoglError **error)
 static CoglBool
 _cogl_winsys_context_init (CoglContext *context, CoglError **error)
 {
-  CoglContextWgl *wgl_context;
-
-  wgl_context = context->winsys = g_new0 (CoglContextWgl, 1);
+  context->winsys = g_new0 (CoglContextWgl, 1);
 
   cogl_win32_renderer_add_filter (context->display->renderer,
                                   win32_event_filter_cb,
diff --git a/tests/conform/test-wrap-rectangle-textures.c b/tests/conform/test-wrap-rectangle-textures.c
index 7fee765..bb8bf69 100644
--- a/tests/conform/test-wrap-rectangle-textures.c
+++ b/tests/conform/test-wrap-rectangle-textures.c
@@ -1,5 +1,4 @@
 #include <cogl/cogl.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
 
 #include <string.h>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]