Commit Graph

13 Commits

Author SHA1 Message Date
Cameron Gutman
9496c25271 Add a lock to synchronize DRM master ownership between Qt and SDL 2026-04-04 14:47:57 -05:00
Cameron Gutman
78bc2141f6 Fix getSdlFdEntryIndex() for FD 0 2026-04-02 21:20:33 -05:00
Cameron Gutman
effac744c7 Fix handling close(0) in our DRM master hooks
Prior to this fix, we would become out of sync and fail to promote
Qt and SDL FDs to master when required, causing Qt's mouse to
disappear and the SDL video subsystem to fail initialization when
trying to stream.
2026-04-02 21:01:46 -05:00
Cameron Gutman
0a2b134d49 Disable the DRM master hooks when EGLFS isn't used 2026-02-05 22:36:31 -06:00
Cameron Gutman
1144dbccb3 Don't call dlsym() in our DRM master hooks
Not only is it faster to cache the function pointers, calling
dlsym() inside open()/close() can lead to deadlocks when using
Vulkan Video decoding on top of the Nvidia driver.
2025-10-12 22:49:29 -05:00
Cameron Gutman
490aa5082f Don't use SDL locking functions in our open()/close() hooks
Other shared library constructors can invoke open()/close() before
SDL2-compat's constructor runs to load SDL3 and populate the SDL3
function table. This causes SDL_AtomicLock()/SDL_AtomicUnlock()
to jump to 0.

See #1707
2025-10-09 20:03:19 -05:00
Cameron Gutman
dd2a99a96b Prepare for SDL3 support 2025-01-25 16:20:20 -06:00
Cameron Gutman
515db03fe5 Add missing stdbool.h include 2024-10-15 22:38:06 -05:00
Cameron Gutman
054e334066 Allow Qt to borrow DRM master from SDL to update the UI 2024-09-23 22:15:31 -05:00
Cameron Gutman
0e2d5bf441 Fix EGLFS state restoration after Vulkan rendering 2024-09-23 21:32:09 -05:00
Cameron Gutman
9cf305865b Add support for managing multiple SDL DRM FDs
This is required for Vulkan+KMSDRM rendering.
2024-09-21 20:41:43 -05:00
Cameron Gutman
654be492a0 Avoid using LFS64 interfaces with Musl 2023-09-18 20:07:56 -05:00
Cameron Gutman
ab6b88073c Fix build with _FILE_OFFSET_BITS=64 2022-09-05 22:04:24 -05:00