瀏覽代碼

Force threads to finish on CloseWindow()

pull/192/head
raysan5 8 年之前
父節點
當前提交
1142d4edae
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. +3
    -0
      src/core.c

+ 3
- 0
src/core.c 查看文件

@ -463,6 +463,9 @@ void CloseWindow(void)
// Wait for mouse and gamepad threads to finish before closing // Wait for mouse and gamepad threads to finish before closing
// NOTE: Those threads should already have finished at this point // NOTE: Those threads should already have finished at this point
// because they are controlled by windowShouldClose variable // because they are controlled by windowShouldClose variable
windowShouldClose = true; // Added to force threads to exit when the close window is called
pthread_join(mouseThreadId, NULL); pthread_join(mouseThreadId, NULL);
pthread_join(gamepadThreadId, NULL); pthread_join(gamepadThreadId, NULL);
#endif #endif

Loading…
取消
儲存