Display and control your Android device
Expose thread id
Romain Vimontd2689fc1683a
diff --git a/app/src/util/thread.c b/app/src/util/thread.cindex bb4feb62..1fc6bb19 100644--- a/app/src/util/thread.c+++ b/app/src/util/thread.c@@ -64,6 +64,11 @@ sc_mutex_unlock(sc_mutex *mutex) {#endif}+sc_thread_id+sc_thread_get_id(void) {+ return SDL_ThreadID();+}+boolsc_cond_init(sc_cond *cond) {SDL_cond *sdl_cond = SDL_CreateCond();diff --git a/app/src/util/thread.h b/app/src/util/thread.hindex 5fbaf3c1..85a2aca0 100644--- a/app/src/util/thread.h+++ b/app/src/util/thread.h@@ -12,6 +12,7 @@ typedef struct SDL_mutex SDL_mutex;typedef struct SDL_cond SDL_cond;typedef int sc_thread_fn(void *);+typedef unsigned int sc_thread_id;typedef struct sc_thread {SDL_Thread *thread;@@ -44,6 +45,9 @@ sc_mutex_lock(sc_mutex *mutex);voidsc_mutex_unlock(sc_mutex *mutex);+sc_thread_id+sc_thread_get_id(void);+boolsc_cond_init(sc_cond *cond);