mirror of https://github.com/OpenMW/openmw.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
462 B
C++
24 lines
462 B
C++
3 years ago
|
#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();
|
||
|
}
|
||
|
|
||
|
}
|