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

@@ -371,7 +371,7 @@ SDL_Thread *SDL_CreateThreadWithPropertiesRuntime(SDL_PropertiesID props,
return NULL;
}
SDL_InitTLSData();
SDL_InitMainThread();
SDL_Thread *thread = (SDL_Thread *)SDL_calloc(1, sizeof(*thread));
if (!thread) {