Skip to content

Commit 0942fb5

Browse files
authored
Merge pull request #422 from MaddTheSane/patch-2
Update rthreads.c
2 parents 44282bc + 11fe823 commit 0942fb5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

desmume/src/libretro-common/rthreads/rthreads.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct sthread
7575
{
7676
#ifdef USE_WIN32_THREADS
7777
HANDLE thread;
78-
DWORD thread_id;
78+
DWORD thread_id;
7979
#else
8080
pthread_t id;
8181
#endif
@@ -194,7 +194,7 @@ sthread_t *sthread_create_with_priority(void (*thread_func)(void*), void *userda
194194
data->userdata = userdata;
195195

196196
#ifdef USE_WIN32_THREADS
197-
thread->thread = CreateThread(NULL, 0, thread_wrap, data, 0, &thread->thread_id);
197+
thread->thread = CreateThread(NULL, 0, thread_wrap, data, 0, &thread->thread_id);
198198
thread_created = !!thread->thread;
199199
#else
200200
pthread_attr_t thread_attr;
@@ -314,8 +314,8 @@ void sthread_setname(sthread_t *thread, const char *name)
314314
{
315315
if (!thread)
316316
return;
317-
// TODO: implement that for Windows too.
318-
#ifndef USE_WIN32_THREADS
317+
// TODO: implement that for Windows (and Mac?) too.
318+
#if !defined(USE_WIN32_THREADS) && !defined(__APPLE__)
319319
pthread_setname_np(thread->id, name);
320320
#endif
321321
}

0 commit comments

Comments
 (0)