aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/jack.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-02-21 10:17:48 -0800
committerChris Robinson <[email protected]>2017-02-21 10:17:48 -0800
commite0e6efbfeac7bb07dce82b63b7688648e1067da3 (patch)
tree360263477886a3d9e624d07cbfb2993373a7b4fd /Alc/backends/jack.c
parentbb4726d52038befc53ab219da8b75193a2605c5d (diff)
Print warnings about missing libraries and functions
Diffstat (limited to 'Alc/backends/jack.c')
-rw-r--r--Alc/backends/jack.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Alc/backends/jack.c b/Alc/backends/jack.c
index fa04c594..f1cd82bd 100644
--- a/Alc/backends/jack.c
+++ b/Alc/backends/jack.c
@@ -96,6 +96,8 @@ static ALCboolean jack_load(void)
#ifdef HAVE_DYNLOAD
if(!jack_handle)
{
+ al_string missing_funcs = AL_STRING_INIT_STATIC();
+
#ifdef _WIN32
#define JACKLIB "libjack.dll"
#else
@@ -103,13 +105,17 @@ static ALCboolean jack_load(void)
#endif
jack_handle = LoadLib(JACKLIB);
if(!jack_handle)
+ {
+ WARN("Failed to load %s\n", JACKLIB);
return ALC_FALSE;
+ }
error = ALC_FALSE;
#define LOAD_FUNC(f) do { \
p##f = GetSymbol(jack_handle, #f); \
if(p##f == NULL) { \
error = ALC_TRUE; \
+ al_string_append_cstr(&missing_funcs, "\n" #f); \
} \
} while(0)
JACK_FUNCS(LOAD_FUNC);
@@ -117,10 +123,11 @@ static ALCboolean jack_load(void)
if(error)
{
+ WARN("Missing expected functions:%s\n", al_string_get_cstr(missing_funcs));
CloseLib(jack_handle);
jack_handle = NULL;
- return ALC_FALSE;
}
+ al_string_deinit(&missing_funcs);
}
#endif