Fixed bug 1419 - SDL_libgl2D.c breaks ndk-build
authorSam Lantinga
Wed, 15 Feb 2012 21:11:21 -0500
changeset 6291d88e5195dee3
parent 6290 4cf8e87aff95
child 6292 4c25a7b9e819
Fixed bug 1419 - SDL_libgl2D.c breaks ndk-build

Philip Taylor 2012-02-15 10:43:47 PST

render/nds/SDL_libgl2D.c unconditionally includes NDS-only code. SDL's
Android.mk compiles source files matching

$(wildcard $(LOCAL_PATH)/src/render/*/*.c)

which includes that file, causing build errors when running ndk-build.
src/render/nds/SDL_libgl2D.c
src/render/nds/SDL_libgl2D.h
     1.1 --- a/src/render/nds/SDL_libgl2D.c	Wed Feb 15 21:06:45 2012 -0500
     1.2 +++ b/src/render/nds/SDL_libgl2D.c	Wed Feb 15 21:11:21 2012 -0500
     1.3 @@ -13,6 +13,9 @@
     1.4   *
     1.5   *	A very small and simple DS rendering lib using the 3d core to render 2D stuff
     1.6   */
     1.7 +#include "SDL_config.h"
     1.8 +
     1.9 +#if SDL_VIDEO_RENDER_NDS
    1.10  
    1.11  #include "SDL_libgl2D.h"
    1.12  
    1.13 @@ -308,3 +311,5 @@
    1.14  	glPopMatrix(1);
    1.15  	g_depth++;
    1.16  }
    1.17 +
    1.18 +#endif /* SDL_VIDEO_RENDER_NDS */
     2.1 --- a/src/render/nds/SDL_libgl2D.h	Wed Feb 15 21:06:45 2012 -0500
     2.2 +++ b/src/render/nds/SDL_libgl2D.h	Wed Feb 15 21:11:21 2012 -0500
     2.3 @@ -13,6 +13,9 @@
     2.4   *
     2.5   *	A very small and simple DS rendering lib using the 3d core to render 2D stuff
     2.6   */
     2.7 +#include "SDL_config.h"
     2.8 +
     2.9 +#if SDL_VIDEO_RENDER_NDS
    2.10  
    2.11  #include <nds/arm9/videoGL.h>
    2.12  
    2.13 @@ -148,3 +151,4 @@
    2.14   */
    2.15  void glBoxFilled(int x1, int y1, int x2, int y2, int color);
    2.16  
    2.17 +#endif /* SDL_VIDEO_RENDER_NDS */