Source Thread Fix
If you have a high-end system with somewhere around 32 CPU threads or more, you may encounter this error when attempting to launch older versions of a few different Source games:
Out of thread ids. Decrease the number of threads or increase MAX_THREADS_SUPPORTED.
This tool aims to solve this issue on Windows by tricking the engine into thinking it’s running on a lower core-count system.
Copyright and disclaimer
If you want to bundle copies of this tool with something, or reuse some of its code, please refer to the LICENCE
file included in the download to know what you can and cannot do, legally speaking.
Also, keep in mind that this software has absolutely NO WARRANTY! There’s no reason it should break anything, but that’s not a legal guarantee. Details of that are also written out in excruciating legalese in the included LICENCE
file. You’re assumed to have read that legalese before attempting to use this tool for any purpose!
Downloads
The current version is 1.2 and can be downloaded here.
At the time of writing, this tool basically just works and is unlikely to ever need major updates. However, if you run into issues with it in the relatively distant future, do check back here just in case there’s a newer one.
For techie people:
If you want to build the wrapper executable from source code, or fiddle with the code yourself, the development repository is published here. You cangit clone
it from that URL too. If you want to clone over other protocols or get a slightly fancier browser, it’s also mirrored on both GitLab and GitHub. This release is built from Git tag v1.2
(which points at commit 7051e068d3250c44a47b7ea14d911c104696b6fa
). In theory, you should be able to produce a bit-for-bit identical copy of the executable using Clang from LLVM 16.0.5 and version 10.0.22000.0 of the Windows 10 SDK. Good luck!How to use
Place the hl2.wrap.exe
executable alongside your hl2.exe
. If your game has a different executable name (for example left4dead.exe
) then rename the wrapper accordingly.
Then, simply execute the wrapper instead of the game. If you have something like a batch file or shortcut passing launch parameters to your game, you can keep passing those same options to the wrapper instead. Everything should Just Work.
WARNING: if your game is VAC-enabled, do not join any servers unless you are sure that they were launched with the -insecure
flag. This wrapper starts the client in insecure mode as a precaution, but in some versions of some games this does not prevent you from joining a VAC-secured server and possibly getting banned. You have been warned!
Thanks, and have fun!