Added iPhone OS (__IPHONEOS__) as a platform
authorHolmes Futrell <hfutrell@umail.ucsb.edu>
Sun, 22 Jun 2008 23:12:02 +0000
changeset 2705 0f62c4ae1cd5
parent 2704 e708fe246d03
child 2706 ce3ddf8dd6d2
Added iPhone OS (__IPHONEOS__) as a platform
include/SDL_platform.h
--- a/include/SDL_platform.h	Sun Jun 22 23:10:44 2008 +0000
+++ b/include/SDL_platform.h	Sun Jun 22 23:12:02 2008 +0000
@@ -57,13 +57,19 @@
 #undef __LINUX__
 #define __LINUX__	1
 #endif
+
 #if defined(__APPLE__)
+#include "targetconditionals.h"
+#if TARGET_OS_IPHONE
+#undef __IPHONEOS__
+#define __IPHONEOS__ 1
+#undef __MACOSX__
+#else
 #undef __MACOSX__
 #define __MACOSX__	1
-#elif defined(macintosh)
-#undef __MACOS__
-#define __MACOS__	1
+#endif
 #endif
+
 #if defined(__NetBSD__)
 #undef __NETBSD__
 #define __NETBSD__	1