summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-03-28 16:46:10 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-03-28 16:46:10 +0200
commit06dbf0d4af94117089e1625cb49562ad09ac6980 (patch)
treeb66bba0bb5a2a791da4c69a64965efdea3eee3e6 /src
parentMinor Section optimizations (diff)
downloadAltCraft-06dbf0d4af94117089e1625cb49562ad09ac6980.tar
AltCraft-06dbf0d4af94117089e1625cb49562ad09ac6980.tar.gz
AltCraft-06dbf0d4af94117089e1625cb49562ad09ac6980.tar.bz2
AltCraft-06dbf0d4af94117089e1625cb49562ad09ac6980.tar.lz
AltCraft-06dbf0d4af94117089e1625cb49562ad09ac6980.tar.xz
AltCraft-06dbf0d4af94117089e1625cb49562ad09ac6980.tar.zst
AltCraft-06dbf0d4af94117089e1625cb49562ad09ac6980.zip
Diffstat (limited to 'src')
-rw-r--r--src/RendererWorld.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/RendererWorld.cpp b/src/RendererWorld.cpp
index 04d8392..aa64dc0 100644
--- a/src/RendererWorld.cpp
+++ b/src/RendererWorld.cpp
@@ -150,7 +150,7 @@ RendererWorld::RendererWorld(GameState* ptr) {
gs = ptr;
frustum = std::make_unique<Frustum>();
MaxRenderingDistance = 2;
- numOfWorkers = 2;
+ numOfWorkers = _max(1, (signed int) std::thread::hardware_concurrency() - 2);
listener = std::make_unique<EventListener>();