From 721d18589fc0f6caf1785a682b3c10adbfaf7402 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 14 Jun 2019 18:24:55 +0200 Subject: [PATCH] Corrected issue with input threads (RPI) --- src/core.c | 5 +++-- 1 file 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");