mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 11:28:15 +00:00
pipewire: Don't require pw_check_library_version() with Pipewire < 0.3.75
The Debian 12 'bookworm' stable release only has 0.3.65, which is earlier than the introduction of that symbol. Similarly, Steam Runtime 3 'sniper' and Steam Runtime 2 'soldier' have a backport of 0.3.65 from Debian 12, so they have the same limitation. steamrt/tasks#686 Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:

committed by
Sam Lantinga

parent
113eb6f01d
commit
d57aa6f7af
@@ -62,7 +62,9 @@ static bool pipewire_initialized = false;
|
|||||||
|
|
||||||
// Pipewire entry points
|
// Pipewire entry points
|
||||||
static const char *(*PIPEWIRE_pw_get_library_version)(void);
|
static const char *(*PIPEWIRE_pw_get_library_version)(void);
|
||||||
|
#if PW_CHECK_VERSION(0, 3, 75)
|
||||||
static bool (*PIPEWIRE_pw_check_library_version)(int major, int minor, int micro);
|
static bool (*PIPEWIRE_pw_check_library_version)(int major, int minor, int micro);
|
||||||
|
#endif
|
||||||
static void (*PIPEWIRE_pw_init)(int *, char ***);
|
static void (*PIPEWIRE_pw_init)(int *, char ***);
|
||||||
static void (*PIPEWIRE_pw_deinit)(void);
|
static void (*PIPEWIRE_pw_deinit)(void);
|
||||||
static struct pw_main_loop *(*PIPEWIRE_pw_main_loop_new)(const struct spa_dict *loop);
|
static struct pw_main_loop *(*PIPEWIRE_pw_main_loop_new)(const struct spa_dict *loop);
|
||||||
@@ -158,7 +160,9 @@ static void unload_pipewire_library(void)
|
|||||||
static bool load_pipewire_syms(void)
|
static bool load_pipewire_syms(void)
|
||||||
{
|
{
|
||||||
SDL_PIPEWIRE_SYM(pw_get_library_version);
|
SDL_PIPEWIRE_SYM(pw_get_library_version);
|
||||||
|
#if PW_CHECK_VERSION(0, 3, 75)
|
||||||
SDL_PIPEWIRE_SYM(pw_check_library_version);
|
SDL_PIPEWIRE_SYM(pw_check_library_version);
|
||||||
|
#endif
|
||||||
SDL_PIPEWIRE_SYM(pw_init);
|
SDL_PIPEWIRE_SYM(pw_init);
|
||||||
SDL_PIPEWIRE_SYM(pw_deinit);
|
SDL_PIPEWIRE_SYM(pw_deinit);
|
||||||
SDL_PIPEWIRE_SYM(pw_main_loop_new);
|
SDL_PIPEWIRE_SYM(pw_main_loop_new);
|
||||||
@@ -1041,7 +1045,11 @@ static bool hotplug_loop_init(void)
|
|||||||
|
|
||||||
spa_list_init(&hotplug.global_list);
|
spa_list_init(&hotplug.global_list);
|
||||||
|
|
||||||
|
#if PW_CHECK_VERSION(0, 3, 75)
|
||||||
hotplug.have_1_0_5 = PIPEWIRE_pw_check_library_version(1,0,5);
|
hotplug.have_1_0_5 = PIPEWIRE_pw_check_library_version(1,0,5);
|
||||||
|
#else
|
||||||
|
hotplug.have_1_0_5 = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
hotplug.loop = PIPEWIRE_pw_thread_loop_new("SDLPwCameraPlug", NULL);
|
hotplug.loop = PIPEWIRE_pw_thread_loop_new("SDLPwCameraPlug", NULL);
|
||||||
if (!hotplug.loop) {
|
if (!hotplug.loop) {
|
||||||
|
Reference in New Issue
Block a user