mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-20 18:42:17 +00:00
- Missed some things regarding software threads.
(with help from dpJudas)
This commit is contained in:
parent
8c81888471
commit
ab24128049
3 changed files with 5 additions and 4 deletions
|
@ -147,7 +147,7 @@ void PolyRenderThreads::RenderThreadSlices(int totalcount, std::function<void(Po
|
|||
|
||||
int numThreads = std::thread::hardware_concurrency();
|
||||
if (numThreads == 0)
|
||||
numThreads = 4;
|
||||
numThreads = 2;
|
||||
|
||||
if (r_scene_multithreaded == 0 || r_multithreaded == 0)
|
||||
numThreads = 1;
|
||||
|
|
|
@ -174,11 +174,12 @@ void DrawerThreads::StartThreads()
|
|||
{
|
||||
std::unique_lock<std::mutex> lock(threads_mutex);
|
||||
|
||||
int num_threads = std::thread::hardware_concurrency();
|
||||
static int num_threads = std::thread::hardware_concurrency();
|
||||
if (num_threads == 0)
|
||||
{
|
||||
num_threads = 2;
|
||||
Printf ("Could not determine number of CPU cores (assuming 2). Set r_multithreaded.\n");
|
||||
if (r_multithreaded == 1)
|
||||
Printf ("Could not determine number of CPU cores (assuming 2). Set r_multithreaded.\n");
|
||||
}
|
||||
|
||||
if (r_multithreaded == 0)
|
||||
|
|
|
@ -211,7 +211,7 @@ namespace swrenderer
|
|||
{
|
||||
int numThreads = std::thread::hardware_concurrency();
|
||||
if (numThreads == 0)
|
||||
numThreads = 4;
|
||||
numThreads = 2;
|
||||
|
||||
if (r_scene_multithreaded == 0 || r_multithreaded == 0)
|
||||
numThreads = 1;
|
||||
|
|
Loading…
Reference in a new issue