Update android platform macro detection

This commit is contained in:
halx99 2021-11-16 16:27:56 +08:00 committed by GitHub
parent 8e1087a987
commit 01b5e6fa2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ THE SOFTWARE.
#define CC_TARGET_PLATFORM CC_PLATFORM_UNKNOWN
// Apple: Mac and iOS
#if defined(__APPLE__) && !defined(ANDROID) // exclude android for binding generator.
#if defined(__APPLE__) && !defined(__ANDROID__) // exclude android for binding generator.
#include <TargetConditionals.h>
#if TARGET_OS_IPHONE // TARGET_OS_IPHONE includes TARGET_OS_IOS TARGET_OS_TV and TARGET_OS_WATCH. see TargetConditionals.h
#undef CC_TARGET_PLATFORM
@ -70,7 +70,7 @@ THE SOFTWARE.
#endif
// android
#if defined(ANDROID)
#if defined(__ANDROID__)
#undef CC_TARGET_PLATFORM
#define CC_TARGET_PLATFORM CC_PLATFORM_ANDROID
#endif