diff --git a/Source/Engine/Platform/Apple/ApplePlatform.cpp b/Source/Engine/Platform/Apple/ApplePlatform.cpp index eeef5b91f..25964ff83 100644 --- a/Source/Engine/Platform/Apple/ApplePlatform.cpp +++ b/Source/Engine/Platform/Apple/ApplePlatform.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -309,6 +310,14 @@ bool ApplePlatform::Init() OnPlatformUserAdd(New(username)); } + // Increase the maximum number of simultaneously open files + { + struct rlimit limit; + limit.rlim_cur = OPEN_MAX; + limit.rlim_max = RLIM_INFINITY; + setrlimit(RLIMIT_NOFILE, &limit); + } + AutoreleasePool = [[NSAutoreleasePool alloc] init]; return false;