From 633c832e43c42bce0a685a93acfc3937c84ed6bb Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Sun, 9 May 2010 17:06:27 +0000 Subject: Added support for OpenAL sound output, activated by setting ‘s_enable’ cvar to 2. Added ‘al_driver’ cvar for choosing what OpenAL library to link dynamically with. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/sys_unix.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'source/sys_unix.c') diff --git a/source/sys_unix.c b/source/sys_unix.c index 96de99e..0368a77 100644 --- a/source/sys_unix.c +++ b/source/sys_unix.c @@ -800,11 +800,15 @@ void *Sys_LoadLibrary( const char *path, const char *sym, void **handle ) { return NULL; } - entry = dlsym( module, sym ); - if( !entry ) { - Com_DPrintf( "%s failed: %s\n", __func__, dlerror() ); - dlclose( module ); - return NULL; + if( sym ) { + entry = dlsym( module, sym ); + if( !entry ) { + Com_DPrintf( "%s failed: %s\n", __func__, dlerror() ); + dlclose( module ); + return NULL; + } + } else { + entry = NULL; } Com_DPrintf( "%s succeeded: %s\n", __func__, path ); -- cgit v1.2.3