Skip to content

Commit 66cc796

Browse files
dos1SiegeLord
authored andcommitted
SDL: fix compilation with SDL older than 2.0.9
SDL_CreateThreadWithStackSize is a very new API addition.
1 parent 797d707 commit 66cc796

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sdl/sdl_thread.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ void _al_thread_create_with_stacksize(_AL_THREAD *thread, void (*proc)(_AL_THREA
2929
thread->should_stop = false;
3030
thread->proc = proc;
3131
thread->arg = arg;
32+
#if SDL_VERSION_ATLEAST(2,0,9)
3233
thread->thread = SDL_CreateThreadWithStackSize(thread_trampoline, "allegro", stacksize, thread);
34+
#else
35+
thread->thread = SDL_CreateThread(thread_trampoline, "allegro", thread);
36+
#endif
3337
}
3438

3539
void _al_thread_set_should_stop(_AL_THREAD *thread)

0 commit comments

Comments
 (0)