mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
CreateThread must specify storage for the thread identifier on <= win98
This commit is contained in:
parent
8e59cb9f7e
commit
de27275fc9
@ -159,7 +159,9 @@ sthread_t *sthread_create(void (*thread_func)(void*), void *userdata)
|
|||||||
bool thread_created = false;
|
bool thread_created = false;
|
||||||
struct thread_data *data = NULL;
|
struct thread_data *data = NULL;
|
||||||
sthread_t *thread = (sthread_t*)calloc(1, sizeof(*thread));
|
sthread_t *thread = (sthread_t*)calloc(1, sizeof(*thread));
|
||||||
|
#if defined(_WIN32_WINNT) && _WIN32_WINNT <= 0x0410
|
||||||
|
uint32_t thread_id = 0;
|
||||||
|
#endif
|
||||||
if (!thread)
|
if (!thread)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@ -171,7 +173,11 @@ sthread_t *sthread_create(void (*thread_func)(void*), void *userdata)
|
|||||||
data->userdata = userdata;
|
data->userdata = userdata;
|
||||||
|
|
||||||
#ifdef USE_WIN32_THREADS
|
#ifdef USE_WIN32_THREADS
|
||||||
|
#if defined(_WIN32_WINNT) && _WIN32_WINNT <= 0x0410
|
||||||
|
thread->thread = CreateThread(NULL, 0, thread_wrap, data, 0, &thread_id);
|
||||||
|
#else
|
||||||
thread->thread = CreateThread(NULL, 0, thread_wrap, data, 0, NULL);
|
thread->thread = CreateThread(NULL, 0, thread_wrap, data, 0, NULL);
|
||||||
|
#endif
|
||||||
thread_created = !!thread->thread;
|
thread_created = !!thread->thread;
|
||||||
#else
|
#else
|
||||||
#if defined(VITA)
|
#if defined(VITA)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user