-#include "quakedef.h"
-#include "thread.h"
#include <SDL.h>
#include <SDL_thread.h>
+#include "quakedef.h"
+#include "thread.h"
int Thread_Init(void)
{
void *_Thread_CreateThread(int (*fn)(void *), void *data, const char *filename, int fileline)
{
+#if SDL_MAJOR_VERSION == 1
void *thread = (void *)SDL_CreateThread(fn, data);
+#else
+ void *thread = (void *)SDL_CreateThread(fn, filename, data);
+#endif
#ifdef THREADDEBUG
Sys_PrintfToTerminal("%p thread create %s:%i\n" , thread, filename, fileline);
#endif