fix/finish SDL2 port
* implement gamma * menu keys fixed * add support for horizontal mousewheel and some more mouse buttons * fix keyrepeat * fix window resizing * fix compiler warnings * use SDL to access clipboard * remove X11-dependency * some surplus SDL headers removed * fix setdesktopres * fix vsync * improve fullscreentoggle on linux * remove togglegrab
This commit is contained in:
@@ -909,13 +909,13 @@ static int sl_thread_indir(void *info)
|
||||
return res;
|
||||
}
|
||||
|
||||
void *sl_createthread(int (*fn)(void *), void *data)
|
||||
void *sl_createthread(int (*fn)(void *), void *data, const char *name)
|
||||
{
|
||||
sl_threadinfo *ti = new sl_threadinfo;
|
||||
ti->data = data;
|
||||
ti->fn = fn;
|
||||
ti->done = 0;
|
||||
ti->handle = SDL_CreateThread(sl_thread_indir, NULL, ti);
|
||||
ti->handle = SDL_CreateThread(sl_thread_indir, name, ti);
|
||||
return (void *) ti;
|
||||
}
|
||||
|
||||
@@ -954,7 +954,7 @@ void sl_detachthread(void *ti) // SDL can't actually detach threads, so this is
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t mainthreadid = SDL_ThreadID();
|
||||
static SDL_threadID mainthreadid = SDL_ThreadID();
|
||||
bool ismainthread() { return mainthreadid == SDL_ThreadID(); }
|
||||
|
||||
#else
|
||||
@@ -968,13 +968,14 @@ static void *sl_thread_indir(void *info)
|
||||
return &ti->res;
|
||||
}
|
||||
|
||||
void *sl_createthread(int (*fn)(void *), void *data)
|
||||
void *sl_createthread(int (*fn)(void *), void *data, const char *name)
|
||||
{
|
||||
sl_threadinfo *ti = new sl_threadinfo;
|
||||
ti->data = data;
|
||||
ti->fn = fn;
|
||||
ti->done = 0;
|
||||
pthread_create(&(ti->handle), NULL, sl_thread_indir, ti);
|
||||
if(name) pthread_setname_np(ti->handle, name);
|
||||
return (void *) ti;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user