From fc86d0e12e3b0559ceae74f6f66690466a668fa4 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 21 Feb 2013 15:10:15 +0000 Subject: [PATCH] win32: Minor build fixes for building for win32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (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 12eed4343..18c9371d6 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 #include diff --git a/cogl/winsys/cogl-winsys-wgl.c b/cogl/winsys/cogl-winsys-wgl.c index e6686d86b..33e7ad2f2 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 7fee76590..bb8bf6911 100644 --- a/tests/conform/test-wrap-rectangle-textures.c +++ b/tests/conform/test-wrap-rectangle-textures.c @@ -1,5 +1,4 @@ #include -#include #include