Skip to content

Commit 6e6cdb6

Browse files
Update CCPlatformConfig.h (#20693)
With latest ndk23 there is no move ANDROID define. The correct way (before and now) is to use __ANDROID__ https://iq.opengenus.org/detect-operating-system-in-c/
1 parent a0df006 commit 6e6cdb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cocos/platform/CCPlatformConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ THE SOFTWARE.
5858
#define CC_TARGET_PLATFORM CC_PLATFORM_UNKNOWN
5959

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

7272
// android
73-
#if defined(ANDROID)
73+
#if defined(__ANDROID__)
7474
#undef CC_TARGET_PLATFORM
7575
#define CC_TARGET_PLATFORM CC_PLATFORM_ANDROID
7676
#endif

0 commit comments

Comments
 (0)