mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-08 09:37:53 +00:00
25 lines
462 B
C++
25 lines
462 B
C++
|
#include "platform.hpp"
|
||
|
|
||
|
#include <stdio.h>
|
||
|
|
||
|
namespace Platform
|
||
|
{
|
||
|
|
||
|
static void increaseFileHandleLimit()
|
||
|
{
|
||
|
#ifdef WIN32
|
||
|
// Increase limit for open files at the stream I/O level, see
|
||
|
// https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setmaxstdio?view=msvc-170#remarks
|
||
|
_setmaxstdio(8192);
|
||
|
#else
|
||
|
// No-op on any other platform.
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
void init()
|
||
|
{
|
||
|
increaseFileHandleLimit();
|
||
|
}
|
||
|
|
||
|
}
|