summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2019-06-14 18:24:55 +0200
committerRay <[email protected]>2019-06-14 18:24:55 +0200
commit721d18589fc0f6caf1785a682b3c10adbfaf7402 (patch)
tree9f869b82052d8aebcce35b738189a22953f3bf1b /src
parentdccd61bef9074bea715e8afb29b2043b4f4b66a3 (diff)
downloadraylib-721d18589fc0f6caf1785a682b3c10adbfaf7402.tar.gz
raylib-721d18589fc0f6caf1785a682b3c10adbfaf7402.zip
Corrected issue with input threads (RPI)
Diffstat (limited to 'src')
-rw-r--r--src/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index fff7ab35..0c96a538 100644
--- a/src/core.c
+++ b/src/core.c
@@ -765,12 +765,13 @@ void CloseWindow(void)
for (int i = 0; i < sizeof(eventWorkers)/sizeof(InputEventWorker); ++i)
{
- if (eventWorkers[i].threadId == 0)
+ if (eventWorkers[i].threadId)
{
pthread_join(eventWorkers[i].threadId, NULL);
}
}
- pthread_join(gamepadThreadId, NULL);
+
+ if (gamepadThreadId) pthread_join(gamepadThreadId, NULL);
#endif
TraceLog(LOG_INFO, "Window closed successfully");