From 01b5e6fa2b83eb0772965d2033d8ef63a78eea8b Mon Sep 17 00:00:00 2001 From: halx99 Date: Tue, 16 Nov 2021 16:27:56 +0800 Subject: [PATCH] Update android platform macro detection --- cocos/platform/CCPlatformConfig.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/platform/CCPlatformConfig.h b/cocos/platform/CCPlatformConfig.h index 62f91f9bf3..97867bd066 100644 --- a/cocos/platform/CCPlatformConfig.h +++ b/cocos/platform/CCPlatformConfig.h @@ -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 #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