diff --git a/changelog.txt b/changelog.txt index d37bac2..9b394c9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -14,6 +14,8 @@ add: /toggle can now accept a value sequence (2 or more entries) to loop through if the cvar's current value is in the sequence and not in the last spot, the next one is used otherwise, the first value in the sequence is used +chg: on Windows, the upper limit of open stdio file handles was raised from 512 to 2048 + fix: on Windows, could sometimes click outside the engine's window in raw mouse input mode fix: when r_msaa was in the range [2, 16], the requested sample count was always 4 diff --git a/code/qcommon/files.cpp b/code/qcommon/files.cpp index 8783e1c..1e5cdf4 100644 --- a/code/qcommon/files.cpp +++ b/code/qcommon/files.cpp @@ -3042,6 +3042,13 @@ void FS_InitFilesystem() Com_StartupVariable( "fs_homepath" ); Com_StartupVariable( "fs_game" ); +#if defined( _WIN32 ) + // MSDN: "The limit of 512 open files at the stdio level can be increased to a maximum of 2,048 by means of the _setmaxstdio function." + // MSDN: "the maximum of 2,048 is a hard upper limit for the number of simultaneously open files accessed through the C run-time library" + // increase the upper limit of open stdio file handles from 512 to 2048 + _setmaxstdio( 2048 ); +#endif + // try to start up normally FS_Startup( BASEGAME );