From 6783a9aa8370c0d4e5d45462709f3f50557caab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 19 Apr 2017 15:46:06 +0200 Subject: Update comment --- c_src/nif_helpers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/c_src/nif_helpers.c b/c_src/nif_helpers.c index 8953f2e..f29d76d 100644 --- a/c_src/nif_helpers.c +++ b/c_src/nif_helpers.c @@ -169,8 +169,9 @@ void* nif_create_main_thread(char* name) TAILQ_INIT(st->mailbox); #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. + // On OSX we identify ourselves as the main thread to ensure that + // we are compatible with libraries that require it. For example + // this is necessary with SDL2 in order to receive input events. erl_drv_steal_main_thread(name, &(st->tid), nif_main_thread, st, NULL); #else enif_thread_create(name, &(st->tid), nif_main_thread, st, NULL); -- cgit v1.2.3