diff --git a/neo/sys/threads.cpp b/neo/sys/threads.cpp index 94a1a1c5..a0fe7c8d 100644 --- a/neo/sys/threads.cpp +++ b/neo/sys/threads.cpp @@ -26,6 +26,7 @@ If you have questions concerning this license or the applicable additional terms =========================================================================== */ +#include #include #include #include @@ -109,7 +110,11 @@ void Sys_ShutdownThreads() { continue; Sys_Printf("WARNING: Thread '%s' still running\n", thread[i]->name); +#if SDL_VERSION_ATLEAST(2, 0, 0) + // TODO no equivalent in SDL2 +#else SDL_KillThread(thread[i]->threadHandle); +#endif thread[i] = NULL; } @@ -218,7 +223,11 @@ Sys_CreateThread void Sys_CreateThread(xthread_t function, void *parms, xthreadInfo& info, const char *name) { Sys_EnterCriticalSection(); +#if SDL_VERSION_ATLEAST(2, 0, 0) + SDL_Thread *t = SDL_CreateThread(function, name, parms); +#else SDL_Thread *t = SDL_CreateThread(function, parms); +#endif if (!t) { common->Error("ERROR: SDL_thread for '%s' failed\n", name);