diff options
author | Chris Robinson <[email protected]> | 2012-03-01 03:37:06 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-03-01 03:46:45 -0800 |
commit | 85daab0d5e66534df03dfebd2dc42641398dd29a (patch) | |
tree | 74331d9f94a75ac964e436af022afaf8f08c5c54 /Alc/backends/pulseaudio.c | |
parent | 105faa193551b0272f62aab3e67f305d3ceeb3e5 (diff) |
Don't define lib handles when dynamic loading is disabled
Diffstat (limited to 'Alc/backends/pulseaudio.c')
-rw-r--r-- | Alc/backends/pulseaudio.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index 1acdff71..e6d54835 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -34,8 +34,8 @@ (PA_MAJOR == (major) && PA_MINOR == (minor) && PA_MICRO >= (micro))) #endif -static void *pa_handle; #ifdef HAVE_DYNLOAD +static void *pa_handle; #define MAKE_FUNC(x) static typeof(x) * p##x MAKE_FUNC(pa_context_unref); MAKE_FUNC(pa_sample_spec_valid); @@ -273,10 +273,9 @@ static pa_context *connect_context(pa_threaded_mainloop *loop, ALboolean silent) static ALCboolean pulse_load(void) //{{{ { ALCboolean ret = ALC_TRUE; +#ifdef HAVE_DYNLOAD if(!pa_handle) { -#ifdef HAVE_DYNLOAD - #ifdef _WIN32 #define PALIB "libpulse-0.dll" #elif defined(__APPLE__) && defined(__MACH__) @@ -366,18 +365,13 @@ static ALCboolean pulse_load(void) //{{{ #endif #undef LOAD_OPTIONAL_FUNC -#else /* HAVE_DYNLOAD */ - pa_handle = (void*)0xDEADBEEF; -#endif - if(ret == ALC_FALSE) { -#ifdef HAVE_DYNLOAD CloseLib(pa_handle); -#endif pa_handle = NULL; } } +#endif /* HAVE_DYNLOAD */ return ret; } //}}} |