mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-29 23:27:06 +02:00
[desktop] Set max stdio limit to 2048 on MSVCRT environments (#4023)
Such as MINGW64. I legitimately don't have an explanation for this. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4023 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
08f65cbd01
commit
251a3470dc
1 changed files with 7 additions and 1 deletions
|
|
@ -107,8 +107,14 @@ int main(int argc, char* argv[]) {
|
||||||
QCoreApplication::setApplicationName(QStringLiteral("eden"));
|
QCoreApplication::setApplicationName(QStringLiteral("eden"));
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Increases the maximum open file limit to 8192
|
// Increases the maximum open file limit.
|
||||||
|
// MSVCRT limits this to 2048 for some inexplicable (and likely arcane) reason,
|
||||||
|
// so we have to account for that as well.
|
||||||
|
#ifdef __MSVCRT__
|
||||||
|
_setmaxstdio(2048);
|
||||||
|
#else
|
||||||
_setmaxstdio(8192);
|
_setmaxstdio(8192);
|
||||||
|
#endif
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
// If you start a bundle (binary) on OSX without the Terminal, the working directory is "/".
|
// If you start a bundle (binary) on OSX without the Terminal, the working directory is "/".
|
||||||
// But since we require the working directory to be the executable path for the location of
|
// But since we require the working directory to be the executable path for the location of
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue