]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
query the online, not total, CPUs in case some were shut off xonotic-v0.6.0
authorRudolf Polzer <divverent@alientrap.org>
Sat, 3 Mar 2012 16:31:03 +0000 (17:31 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 3 Mar 2012 16:31:03 +0000 (17:31 +0100)
tools/quake3/common/threads.c

index 1c8e7e758bbe02ad9ecb4112f9561cf19ffcc3cd..b50f6d6071790e95e67a2e06a62b76c5b2d2153b 100644 (file)
@@ -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