diff --git a/src/PhoenixCore/Private/Parallel.cpp b/src/PhoenixCore/Private/Parallel.cpp index 4f88da1..9411677 100644 --- a/src/PhoenixCore/Private/Parallel.cpp +++ b/src/PhoenixCore/Private/Parallel.cpp @@ -1,6 +1,35 @@ #include "Parallel.h" +#ifdef __EMSCRIPTEN__ +// Original implementation would go here for non-web builds +// For web builds, we'll provide simplified stubs + +// Web build stubs +namespace Phoenix +{ + namespace Threading + { + void SpinWait(uint32 cycles) + { + // No-op for web builds + } + } +} + +#else +// Web build stubs +namespace Phoenix +{ + namespace Threading + { + void SpinWait(uint32 cycles) + { + // No-op for web builds + } + } +} + // xatomic.h is Windows-specific, using standard and from Parallel.h #include "PhoenixCore.h" @@ -137,3 +166,7 @@ void ThreadPool::Worker(size_t workerId) ActiveWorkerCount.fetch_sub(1, std::memory_order_acq_rel); } } + +#endif + + diff --git a/src/PhoenixSim/Private/Session.cpp b/src/PhoenixSim/Private/Session.cpp index 6e6f6b3..0426774 100644 --- a/src/PhoenixSim/Private/Session.cpp +++ b/src/PhoenixSim/Private/Session.cpp @@ -102,7 +102,7 @@ void Session::Tick(const SessionStepArgs& args) break; } - AccTickTime -= std::max(hz, stepElapsed); + AccTickTime -= std::max(static_cast(hz), stepElapsed); CurrTickTime = clock(); }