Mercurial > sdl-ios-xcode
comparison src/SDL.c @ 397:283d348cb624
Pth threading bug fix
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 10 Jun 2002 20:42:02 +0000 |
parents | f6ffac90895c |
children | 522e5202014d |
comparison
equal
deleted
inserted
replaced
396:11d6eed68dba | 397:283d348cb624 |
---|---|
148 return(0); | 148 return(0); |
149 } | 149 } |
150 | 150 |
151 int SDL_Init(Uint32 flags) | 151 int SDL_Init(Uint32 flags) |
152 { | 152 { |
153 #if !defined(DISABLE_THREADS) && defined(ENABLE_PTH) | |
154 if (!pth_init()) { | |
155 return -1; | |
156 } | |
157 #endif | |
158 | |
153 /* Clear the error message */ | 159 /* Clear the error message */ |
154 SDL_ClearError(); | 160 SDL_ClearError(); |
155 | 161 |
156 /* Initialize the desired subsystems */ | 162 /* Initialize the desired subsystems */ |
157 if ( SDL_InitSubSystem(flags) < 0 ) { | 163 if ( SDL_InitSubSystem(flags) < 0 ) { |
221 } | 227 } |
222 #endif | 228 #endif |
223 | 229 |
224 /* Uninstall any parachute signal handlers */ | 230 /* Uninstall any parachute signal handlers */ |
225 SDL_UninstallParachute(); | 231 SDL_UninstallParachute(); |
232 | |
233 #if !defined(DISABLE_THREADS) && defined(ENABLE_PTH) | |
234 pth_kill(); | |
235 #endif | |
226 } | 236 } |
227 | 237 |
228 /* Return the library version number */ | 238 /* Return the library version number */ |
229 const SDL_version * SDL_Linked_Version(void) | 239 const SDL_version * SDL_Linked_Version(void) |
230 { | 240 { |