From b052d877decd86e37ffacbe120e9aa3f1ad27fd6 Mon Sep 17 00:00:00 2001 From: couriersud Date: Wed, 7 Jan 2015 20:56:57 +0100 Subject: [PATCH] Fix compile of sync_sdl.c. (nw) --- src/osd/modules/sync/sync_sdl.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/osd/modules/sync/sync_sdl.c b/src/osd/modules/sync/sync_sdl.c index 66de65e2850..423a23face5 100644 --- a/src/osd/modules/sync/sync_sdl.c +++ b/src/osd/modules/sync/sync_sdl.c @@ -13,6 +13,8 @@ // standard C headers #include +#include +#include // 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); +}