SDL: fixed wrong header include when ANDROID macro is not defined

This commit is contained in:
Sergii Pylypenko
2019-02-19 18:43:30 +02:00
parent e887896edf
commit 9397c0079c
8 changed files with 10 additions and 10 deletions

View File

@@ -38,7 +38,7 @@
#include "SDL_config_win32.h"
#elif defined(__OS2__)
#include "SDL_config_os2.h"
#elif defined(ANDROID)
#elif defined(__ANDROID__)
#include "SDL_config_android.h"
#else
#include "SDL_config_minimal.h"

View File

@@ -32,7 +32,7 @@
#if defined(__WIN32__) || \
(defined(__MWERKS__) && !defined(__BEOS__)) || \
defined(__MACOS__) || defined(__MACOSX__) || \
defined(__SYMBIAN32__) || defined(QWS) || defined(ANDROID)
defined(__SYMBIAN32__) || defined(QWS) || defined(__ANDROID__)
#ifdef __cplusplus
#define C_LINKAGE "C"

View File

@@ -25,7 +25,7 @@
#include "SDL_error.h"
#include "SDL_error_c.h"
#ifdef ANDROID
#ifdef __ANDROID__
#include <android/log.h>
#endif
@@ -113,7 +113,7 @@ void SDL_SetError (const char *fmt, ...)
#ifdef DEBUG_ERROR
fprintf(stderr, "ERROR: %s\n", SDL_GetError());
#endif
#ifdef ANDROID
#ifdef __ANDROID__
__android_log_print(ANDROID_LOG_ERROR, "libSDL", "ERROR: %s", SDL_GetError());
#endif
}

View File

@@ -305,7 +305,7 @@ Uint16 SDL_CalculatePitch(SDL_Surface *surface)
break;
}
#ifdef ANDROID
#ifdef __ANDROID__
if( surface->format->BytesPerPixel != 2 ) /* Avoid extra memcpy() when updating GLES textures */
#endif
pitch = (pitch + 3) & ~3; /* 4-byte aligning */

View File

@@ -1437,7 +1437,7 @@ void *SDL_GL_GetProcAddress(const char* proc)
func = NULL;
if ( video->GL_GetProcAddress ) {
#ifdef ANDROID
#ifdef __ANDROID__
if ( 1 ) {
#else
if ( video->gl_config.driver_loaded ) {

View File

@@ -658,7 +658,7 @@ SDL_CalculatePitch(SDL_Surface * surface)
default:
break;
}
#ifdef ANDROID
#ifdef __ANDROID__
if( surface->format->BytesPerPixel != 2 ) /* Avoid extra memcpy() when calling SDL_UpdateTexture() */
#endif
pitch = (pitch + 3) & ~3; /* 4-byte aligning */

View File

@@ -46,7 +46,7 @@ If you compile this code with SDL 1.3 or newer, or use in some other way, the li
#if SDL_VERSION_ATLEAST(1,3,0)
#include "SDL_yuv_sw_c.h"
#endif
#ifdef ANDROID
#ifdef __ANDROID__
#include <android/log.h>
#else
#define __android_log_print(...)
@@ -316,7 +316,7 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
data->GL_OES_draw_texture_supported = SDL_FALSE;
data->useDrawTexture = SDL_FALSE;
#else
#ifdef ANDROID
#ifdef __ANDROID__
data->GL_OES_draw_texture_supported = SDL_TRUE;
data->useDrawTexture = SDL_TRUE;
#else

View File

@@ -48,7 +48,7 @@ If you compile this code with SDL 1.3 or newer, or use in some other way, the li
#include "../events/SDL_sysevents.h"
#include "../events/SDL_events_c.h"
#endif
#ifdef ANDROID
#ifdef __ANDROID__
#include <android/log.h>
#endif