aboutsummaryrefslogtreecommitdiff
path: root/sokol_app.h
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2019-01-26 18:39:15 +0100
committerAndre Weissflog <floooh@gmail.com>2019-01-26 18:39:15 +0100
commit9f9821d64a8ae89fa786eb5ac25021f07f8396f8 (patch)
treeecc64992760653ac9b39d2727ea838e0ae1e857c /sokol_app.h
parent490198313a23bf5d9331c8c49799c9522a4c2ee1 (diff)
fix preprocessor checks for TARGET_OS_IPHONE
Diffstat (limited to 'sokol_app.h')
-rw-r--r--sokol_app.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sokol_app.h b/sokol_app.h
index c5dd9ae2..880f5735 100644
--- a/sokol_app.h
+++ b/sokol_app.h
@@ -615,7 +615,7 @@ SOKOL_API_DECL const void* sapp_win32_get_hwnd(void);
#error "sokol_app.h requires ARC (Automatic Reference Counting) on MacOS and iOS"
#endif
#include <TargetConditionals.h>
- #if TARGET_OS_IPHONE
+ #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
/* iOS */
#if !defined(SOKOL_METAL) && !defined(SOKOL_GLES3)
#error("sokol_app.h: unknown 3D API selected for iOS, must be SOKOL_METAL or SOKOL_GLES3")
@@ -830,7 +830,7 @@ _SOKOL_PRIVATE void _sapp_frame(void) {
#if defined(__APPLE__)
/*== MacOS ===================================================================*/
-#if !TARGET_OS_IPHONE
+#if defined(TARGET_OS_IPHONE) && !TARGET_OS_IPHONE
#import <Metal/Metal.h>
#import <MetalKit/MetalKit.h>
@@ -1273,7 +1273,7 @@ _SOKOL_PRIVATE void _sapp_macos_app_event(sapp_event_type type) {
#endif /* MacOS */
/*== iOS =====================================================================*/
-#if TARGET_OS_IPHONE
+#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#if defined(SOKOL_METAL)
#import <Metal/Metal.h>
@@ -6468,7 +6468,7 @@ SOKOL_API_IMPL bool sapp_gles2(void) {
}
SOKOL_API_IMPL void sapp_show_keyboard(bool shown) {
- #if TARGET_OS_IPHONE
+ #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
_sapp_ios_show_keyboard(shown);
#elif defined(__EMSCRIPTEN__)
_sapp_emsc_show_keyboard(shown);