From: Rudolf Polzer Date: Sat, 3 Mar 2012 16:31:03 +0000 (+0100) Subject: query the online, not total, CPUs in case some were shut off X-Git-Tag: xonotic-v0.6.0^0 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=dba712acf6148cb7c5b4b1ee6d6749e66c08c414;ds=sidebyside query the online, not total, CPUs in case some were shut off --- diff --git a/tools/quake3/common/threads.c b/tools/quake3/common/threads.c index 1c8e7e75..b50f6d60 100644 --- a/tools/quake3/common/threads.c +++ b/tools/quake3/common/threads.c @@ -434,8 +434,8 @@ void ThreadSetDefault (void) { if (numthreads == -1) // not set manually { -#ifdef _SC_NPROCESSORS_CONF - long cpus = sysconf(_SC_NPROCESSORS_CONF); +#ifdef _SC_NPROCESSORS_ONLN + long cpus = sysconf(_SC_NPROCESSORS_ONLN); if (cpus > 0) numthreads = cpus; else