From e0e6efbfeac7bb07dce82b63b7688648e1067da3 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 21 Feb 2017 10:17:48 -0800 Subject: Print warnings about missing libraries and functions --- Alc/backends/jack.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Alc/backends/jack.c') 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 -- cgit v1.2.3