summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2012-02-15 21:11:21 -0500
committerSam Lantinga <slouken@libsdl.org>2012-02-15 21:11:21 -0500
commit0c0fee6df4eb01a7780ec8426e23ec38a2eb27a2 (patch)
tree603b2d69b8087f010b64b429f2cd758078520827
parentd74e6c0137b1e962b45423eefccc39271360a975 (diff)
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.
-rw-r--r--src/render/nds/SDL_libgl2D.c5
-rw-r--r--src/render/nds/SDL_libgl2D.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/render/nds/SDL_libgl2D.c b/src/render/nds/SDL_libgl2D.c
index aaca4ce3..7ba9be07 100644
--- a/src/render/nds/SDL_libgl2D.c
+++ b/src/render/nds/SDL_libgl2D.c
@@ -13,6 +13,9 @@
*
* A very small and simple DS rendering lib using the 3d core to render 2D stuff
*/
+#include "SDL_config.h"
+
+#if SDL_VIDEO_RENDER_NDS
#include "SDL_libgl2D.h"
@@ -308,3 +311,5 @@ void glSpriteScaleXY(int x, int y, s32 scaleX, s32 scaleY, int flipmode, const g
glPopMatrix(1);
g_depth++;
}
+
+#endif /* SDL_VIDEO_RENDER_NDS */
diff --git a/src/render/nds/SDL_libgl2D.h b/src/render/nds/SDL_libgl2D.h
index 97bbebb0..4d56f0e8 100644
--- a/src/render/nds/SDL_libgl2D.h
+++ b/src/render/nds/SDL_libgl2D.h
@@ -13,6 +13,9 @@
*
* A very small and simple DS rendering lib using the 3d core to render 2D stuff
*/
+#include "SDL_config.h"
+
+#if SDL_VIDEO_RENDER_NDS
#include <nds/arm9/videoGL.h>
@@ -148,3 +151,4 @@ void glBox(int x1, int y1, int x2, int y2, int color);
*/
void glBoxFilled(int x1, int y1, int x2, int y2, int color);
+#endif /* SDL_VIDEO_RENDER_NDS */