Skip to content

Commit

Permalink
macos is lying about the header's existence, so it doesn't get multi-…
Browse files Browse the repository at this point in the history
…threading for particles
  • Loading branch information
RicardoLuis0 committed Sep 23, 2023
1 parent 2b94414 commit f7566d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/playsim/p_effect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
** more useful.
*/

#if __has_include(<execution>)
#if __has_include(<execution>) && !__APPLE__

#include <execution>

Expand Down Expand Up @@ -63,7 +63,7 @@ CVAR (Int, r_rail_spiralsparsity, 1, CVAR_ARCHIVE);
CVAR (Int, r_rail_trailsparsity, 1, CVAR_ARCHIVE);
CVAR (Bool, r_particles, true, 0);

#if __has_include(<execution>)
#if __has_include(<execution>) && !__APPLE__

CVAR (Bool, r_particles_multithreaded, true, CVAR_ARCHIVE);

Expand Down Expand Up @@ -289,7 +289,7 @@ void P_ThinkParticles (FLevelLocals *Level)
{
uint64_t startNs = I_nsTime();
std::deque<particle_t>::iterator newEnd;
#if __has_include(<execution>)
#if __has_include(<execution>) && !__APPLE__
if(r_particles_multithreaded)
{
newEnd = std::remove_if(std::execution::par_unseq, Level->Particles.begin(), Level->Particles.end(), [Level](particle_t &p)
Expand Down

0 comments on commit f7566d9

Please sign in to comment.