aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-10-17 00:20:33 +0200
committerLoïc Hoguin <[email protected]>2015-10-17 00:20:33 +0200
commit909de2213ed3a20327635965d69dd905e8906e9f (patch)
tree60fc9b03f44410659f4e039d06b6e05f63193c9a
parent256c3dbc47130a5e282bb306ceb117359729d151 (diff)
downloadesdl2-909de2213ed3a20327635965d69dd905e8906e9f.tar.gz
esdl2-909de2213ed3a20327635965d69dd905e8906e9f.tar.bz2
esdl2-909de2213ed3a20327635965d69dd905e8906e9f.zip
Fix conditionals for detecting OSX
-rw-r--r--c_src/nif_helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c_src/nif_helpers.c b/c_src/nif_helpers.c
index 0528b35..d76f1b5 100644
--- a/c_src/nif_helpers.c
+++ b/c_src/nif_helpers.c
@@ -168,7 +168,7 @@ void* nif_create_main_thread(char* name)
st->mailbox = (nif_thread_mailbox*)enif_alloc(sizeof(nif_thread_mailbox));
TAILQ_INIT(st->mailbox);
-#ifdef __DARWIN__
+#if defined(__APPLE__) && defined(__MACH__)
// On OSX, SDL2 must run in the main thread, otherwise some operations
// will not work properly. For example, input events would not be received.
erl_drv_steal_main_thread(name, &(st->tid), nif_main_thread, st, NULL);