Fix render-thread-calculation can still be below 1

This commit is contained in:
Lukas Rieger (Blue) 2022-04-24 16:00:13 +02:00
parent 492573c866
commit 2f6238349c
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2

View File

@ -27,10 +27,8 @@ public int getRenderThreadCount() {
} }
public int resolveRenderThreadCount() { public int resolveRenderThreadCount() {
if (renderThreadCount > 0) if (renderThreadCount > 0) return renderThreadCount;
return renderThreadCount; return Math.max(Runtime.getRuntime().availableProcessors() + renderThreadCount, 1);
return Runtime.getRuntime().availableProcessors() + renderThreadCount;
} }
public boolean isMetrics() { public boolean isMetrics() {