mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix selection of # threads, set default to 1 thread
This commit is contained in:
parent
28c50c16cd
commit
f00d136ab1
2 changed files with 2 additions and 3 deletions
|
@ -56,8 +56,7 @@ EmergeManager::EmergeManager(IGameDef *gamedef, BiomeDefManager *bdef) {
|
|||
if (g_settings->get("num_emerge_threads").empty()) {
|
||||
int nprocs = porting::getNumberOfProcessors();
|
||||
// leave a proc for the main thread and one for some other misc threads
|
||||
if (nprocs > 2)
|
||||
nthreads = nprocs - 2;
|
||||
nthreads = (nprocs > 2) ? nthreads = nprocs - 2 : 1;
|
||||
} else {
|
||||
nthreads = g_settings->getU16("num_emerge_threads");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue