Skip to content

Commit 12bd57f

Browse files
SiegeLordExSiegeLord
authored andcommitted
Warn about thread with stack size not working on older SDLs.
1 parent 66cc796 commit 12bd57f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/sdl/sdl_thread.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "allegro5/internal/aintern_thread.h"
44
#include "allegro5/platform/allegro_internal_sdl.h"
55

6+
ALLEGRO_DEBUG_CHANNEL("thread")
7+
68
static int thread_trampoline(void* data)
79
{
810
_AL_THREAD *thread = data;
@@ -32,6 +34,9 @@ void _al_thread_create_with_stacksize(_AL_THREAD *thread, void (*proc)(_AL_THREA
3234
#if SDL_VERSION_ATLEAST(2,0,9)
3335
thread->thread = SDL_CreateThreadWithStackSize(thread_trampoline, "allegro", stacksize, thread);
3436
#else
37+
(void)stacksize;
38+
ALLEGRO_WARN("Creating a thread with a custom thread size is not supported "
39+
"on this version of SDL, it is too old.\n");
3540
thread->thread = SDL_CreateThread(thread_trampoline, "allegro", thread);
3641
#endif
3742
}

0 commit comments

Comments
 (0)