Make sure SDL subsystems are initialized before starting threads

This commit is contained in:
Sam Lantinga
2024-07-12 08:50:15 -07:00
parent f531003776
commit bd041b4831
3 changed files with 38 additions and 16 deletions

View File

@@ -289,6 +289,9 @@
extern "C" {
#endif
/* Do any initialization that needs to happen before threads are started */
extern void SDL_InitMainThread(void);
extern int SDLCALL SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS);
extern int SDLCALL SDL_WaitConditionTimeoutNS(SDL_Condition *cond, SDL_Mutex *mutex, Sint64 timeoutNS);
extern SDL_bool SDLCALL SDL_WaitEventTimeoutNS(SDL_Event *event, Sint64 timeoutNS);