1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-28 18:18:52 +00:00
OpenMW/components/platform/platform.cpp
elsid 5859fd464c
Add option to disable precompiled headers
To be able to use ccache.

Also fix compilation errors appeared due to absence of precompiled
headers.
2024-03-08 02:11:51 +01:00

27 lines
482 B
C++

#include "platform.hpp"
#ifdef WIN32
#include <stdio.h>
#endif
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();
}
}