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 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=refs%2Ftags%2Fxonotic-v0.6.0;p=xonotic%2Fnetradiant.git 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