mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
Fix compile of sync_sdl.c. (nw)
This commit is contained in:
parent
941e26ac2f
commit
b052d877de
@ -13,6 +13,8 @@
|
||||
|
||||
// standard C headers
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
|
||||
// MAME headers
|
||||
#include "osdcore.h"
|
||||
@ -315,7 +317,11 @@ osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
|
||||
thread = (osd_thread *)calloc(1, sizeof(osd_thread));
|
||||
thread->callback = callback;
|
||||
thread->param = cbparam;
|
||||
thread->thread = SDL_CreateThread(worker_thread_entry, thread);
|
||||
#ifdef SDLMAME_SDL2
|
||||
thread->thread = SDL_CreateThread(worker_thread_entry, "Thread", thread);
|
||||
#else
|
||||
thread->thread = SDL_CreateThread(worker_thread_entry, thread);
|
||||
#endif
|
||||
if ( thread->thread == NULL )
|
||||
{
|
||||
free(thread);
|
||||
@ -352,3 +358,12 @@ void osd_thread_wait_free(osd_thread *thread)
|
||||
SDL_WaitThread(thread->thread, &status);
|
||||
free(thread);
|
||||
}
|
||||
|
||||
//============================================================
|
||||
// osd_process_kill
|
||||
//============================================================
|
||||
|
||||
void osd_process_kill(void)
|
||||
{
|
||||
kill(getpid(), SIGKILL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user