mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-11 17:05:41 +00:00
Make sure SDL subsystems are initialized before starting threads
This commit is contained in:
parent
b378bc5c83
commit
b057159db7
3 changed files with 35 additions and 20 deletions
|
|
@ -27,7 +27,6 @@
|
|||
#include "SDL_systhread.h"
|
||||
#include "SDL_hints.h"
|
||||
#include "../SDL_error_c.h"
|
||||
#include "../timer/SDL_timer_c.h"
|
||||
|
||||
/* The storage is local to the thread, but the IDs are global for the process */
|
||||
|
||||
|
|
@ -370,11 +369,7 @@ SDL_Thread *SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *),
|
|||
SDL_Thread *thread;
|
||||
int ret;
|
||||
|
||||
SDL_InitTLSData();
|
||||
|
||||
#ifndef SDL_TIMERS_DISABLED
|
||||
SDL_TicksInit();
|
||||
#endif
|
||||
SDL_InitMainThread();
|
||||
|
||||
/* Allocate memory for the thread info structure */
|
||||
thread = (SDL_Thread *)SDL_calloc(1, sizeof(*thread));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue