src/SDL.c
changeset 397 283d348cb624
parent 297 f6ffac90895c
child 543 522e5202014d
--- a/src/SDL.c	Mon Jun 10 20:37:39 2002 +0000
+++ b/src/SDL.c	Mon Jun 10 20:42:02 2002 +0000
@@ -150,6 +150,12 @@
 
 int SDL_Init(Uint32 flags)
 {
+#if !defined(DISABLE_THREADS) && defined(ENABLE_PTH)
+	if (!pth_init()) {
+		return -1;
+	}
+#endif
+
 	/* Clear the error message */
 	SDL_ClearError();
 
@@ -223,6 +229,10 @@
 
 	/* Uninstall any parachute signal handlers */
 	SDL_UninstallParachute();
+
+#if !defined(DISABLE_THREADS) && defined(ENABLE_PTH)
+	pth_kill();
+#endif
 }
 
 /* Return the library version number */