__ANDROID__ is the correct macro to check for an android system.ANDROID is only defined in NDK build system (.mk) and not in the standalone NDK.
parent
3672aeb497
commit
548a0ee7b8
|
@ -420,7 +420,7 @@ typedef struct gbm_device *EGLNativeDisplayType;
|
||||||
typedef struct gbm_bo *EGLNativePixmapType;
|
typedef struct gbm_bo *EGLNativePixmapType;
|
||||||
typedef void *EGLNativeWindowType;
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
#elif defined(ANDROID) /* Android */
|
#elif defined(__ANDROID__) /* Android */
|
||||||
|
|
||||||
struct ANativeWindow;
|
struct ANativeWindow;
|
||||||
struct egl_native_pixmap_t;
|
struct egl_native_pixmap_t;
|
||||||
|
|
|
@ -93,7 +93,7 @@ typedef struct SDL_RWops
|
||||||
Uint32 type;
|
Uint32 type;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
#if defined(ANDROID)
|
#if defined(__ANDROID__)
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
void *fileNameRef;
|
void *fileNameRef;
|
||||||
|
|
|
@ -305,7 +305,7 @@ SDL_StreamDeinit(SDL_AudioStreamer * stream)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ANDROID)
|
#if defined(__ANDROID__)
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "cocoa/SDL_rwopsbundlesupport.h"
|
#include "cocoa/SDL_rwopsbundlesupport.h"
|
||||||
#endif /* __APPLE__ */
|
#endif /* __APPLE__ */
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef __ANDROID__
|
||||||
#include "../core/android/SDL_android.h"
|
#include "../core/android/SDL_android.h"
|
||||||
#include "SDL_system.h"
|
#include "SDL_system.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -466,7 +466,7 @@ SDL_RWFromFile(const char *file, const char *mode)
|
||||||
SDL_SetError("SDL_RWFromFile(): No file or no mode specified");
|
SDL_SetError("SDL_RWFromFile(): No file or no mode specified");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#if defined(ANDROID)
|
#if defined(__ANDROID__)
|
||||||
#ifdef HAVE_STDIO_H
|
#ifdef HAVE_STDIO_H
|
||||||
/* Try to open the file on the filesystem first */
|
/* Try to open the file on the filesystem first */
|
||||||
if (*file == '/') {
|
if (*file == '/') {
|
||||||
|
|
|
@ -309,7 +309,7 @@ rwops_testFileRead(void)
|
||||||
if (rw == NULL) return TEST_ABORTED;
|
if (rw == NULL) return TEST_ABORTED;
|
||||||
|
|
||||||
/* Check type */
|
/* Check type */
|
||||||
#if defined(ANDROID)
|
#if defined(__ANDROID__)
|
||||||
SDLTest_AssertCheck(
|
SDLTest_AssertCheck(
|
||||||
rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE,
|
rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE,
|
||||||
"Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type);
|
"Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type);
|
||||||
|
@ -356,7 +356,7 @@ rwops_testFileWrite(void)
|
||||||
if (rw == NULL) return TEST_ABORTED;
|
if (rw == NULL) return TEST_ABORTED;
|
||||||
|
|
||||||
/* Check type */
|
/* Check type */
|
||||||
#if defined(ANDROID)
|
#if defined(__ANDROID__)
|
||||||
SDLTest_AssertCheck(
|
SDLTest_AssertCheck(
|
||||||
rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE,
|
rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE,
|
||||||
"Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type);
|
"Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type);
|
||||||
|
|
Loading…
Reference in New Issue