Browse Source

Corrected issue with input threads (RPI)

pull/892/head
Ray 5 years ago
parent
commit
721d18589f
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/core.c

+ 3
- 2
src/core.c View File

@ -765,12 +765,13 @@ void CloseWindow(void)
for (int i = 0; i < sizeof(eventWorkers)/sizeof(InputEventWorker); ++i) 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(eventWorkers[i].threadId, NULL);
} }
} }
pthread_join(gamepadThreadId, NULL);
if (gamepadThreadId) pthread_join(gamepadThreadId, NULL);
#endif #endif
TraceLog(LOG_INFO, "Window closed successfully"); TraceLog(LOG_INFO, "Window closed successfully");

Loading…
Cancel
Save