Romain Vimont
3dcd0baa63
Migrate from SDL2 to SDL3
...
Refs <https://wiki.libsdl.org/SDL3/README-migration >
2026-01-02 14:59:10 +01:00
Romain Vimont
e9240f6804
Expose main thread id
...
This will allow to assert that a function is called from the main
thread.
PR #5270 <https://github.com/Genymobile/scrcpy/pull/5270 >
2024-09-14 21:24:15 +02:00
Romain Vimont
5ee59e0f13
Add thread priority API
...
Expose an API to change the priority of the current thread.
2023-03-10 22:22:16 +01:00
Romain Vimont
32e692d5d2
Replace delay by deadline in timedwait()
...
The function sc_cond_timedwait() accepted a parameter representing the
max duration to wait, because it internally uses SDL_CondWaitTimeout().
Instead, accept a deadline, to be consistent with
pthread_cond_timedwait().
2021-07-14 14:22:32 +02:00
Romain Vimont
ec871dd3f5
Wrap tick API
...
This avoids to use the SDL timer API directly, and will allow to handle
generic ticks (possibly negative).
2021-07-14 14:22:32 +02:00
Romain Vimont
f33d37976c
Fix assertion race condition in debug mode
...
Commit 21d206f360 added mutex assertions.
However, the "locker" variable to trace the locker thread id was read
and written by several threads without any protection, so it was racy.
Reported by TSAN.
2021-06-26 15:31:50 +02:00
Romain Vimont
21d206f360
Expose mutex assertions
...
Add a function to assert that the mutex is held (or not).
2021-02-17 09:54:03 +01:00
Romain Vimont
d2689fc168
Expose thread id
2021-02-17 09:54:03 +01:00
Romain Vimont
f6320c7e31
Wrap SDL thread functions into scrcpy-specific API
...
The goal is to expose a consistent API for system tools, and paves the
way to make the "core" independant of SDL in the future.
2021-02-17 09:54:03 +01:00