summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRay <[email protected]>2020-01-29 12:10:50 +0100
committerRay <[email protected]>2020-01-29 12:10:50 +0100
commitaf3df8bdd6e10a155c28b27001a75366fe171619 (patch)
treeb25df9f8005030b9d5fd45409ed89347567e1d9e
parent02a533768c8f60031602fdcebcf51e843c4478f7 (diff)
downloadraylib-af3df8bdd6e10a155c28b27001a75366fe171619.tar.gz
raylib-af3df8bdd6e10a155c28b27001a75366fe171619.zip
Review PHYSAC_NO_THREADS on WebAssembly
-rw-r--r--src/physac.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/physac.h b/src/physac.h
index fb03e2a6..3fb832b6 100644
--- a/src/physac.h
+++ b/src/physac.h
@@ -1016,6 +1016,7 @@ static PolygonData CreateRectanglePolygon(Vector2 pos, Vector2 size)
// Physics loop thread function
static void *PhysicsLoop(void *arg)
{
+#if !defined(PHYSAC_NO_THREADS)
#if defined(PHYSAC_DEBUG)
printf("[PHYSAC] physics thread created successfully\n");
#endif
@@ -1028,6 +1029,7 @@ static void *PhysicsLoop(void *arg)
{
RunPhysicsStep();
}
+#endif
return NULL;
}
@@ -1905,7 +1907,7 @@ static void InitTimer(void)
QueryPerformanceFrequency((unsigned long long int *) &frequency);
#endif
-#if defined(__linux__)
+#if defined(__EMSCRIPTEN__) || defined(__linux__)
struct timespec now;
if (clock_gettime(CLOCK_MONOTONIC, &now) == 0) frequency = 1000000000;
#endif