mirror of
https://github.com/Genymobile/scrcpy
synced 2024-12-12 18:27:16 +00:00
Expose thread id
This commit is contained in:
parent
f6320c7e31
commit
d2689fc168
@ -64,6 +64,11 @@ sc_mutex_unlock(sc_mutex *mutex) {
|
||||
#endif
|
||||
}
|
||||
|
||||
sc_thread_id
|
||||
sc_thread_get_id(void) {
|
||||
return SDL_ThreadID();
|
||||
}
|
||||
|
||||
bool
|
||||
sc_cond_init(sc_cond *cond) {
|
||||
SDL_cond *sdl_cond = SDL_CreateCond();
|
||||
|
@ -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);
|
||||
void
|
||||
sc_mutex_unlock(sc_mutex *mutex);
|
||||
|
||||
sc_thread_id
|
||||
sc_thread_get_id(void);
|
||||
|
||||
bool
|
||||
sc_cond_init(sc_cond *cond);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user