aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/dsound.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-09-23 01:33:58 -0700
committerChris Robinson <[email protected]>2009-09-23 01:33:58 -0700
commit201b108a543c8d0472341918ffac012ad1d94a69 (patch)
tree029e5f940ee83554720c92ef71ab667ab82998ed /Alc/dsound.c
parentbdbdbcea26d4a12d4d3f76ad3724f2ad12a55358 (diff)
Attempt to reload backend libs when probing, if they didn't initially load
Diffstat (limited to 'Alc/dsound.c')
-rw-r--r--Alc/dsound.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c
index ac172344..fe7a0b50 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -479,7 +479,7 @@ static BOOL CALLBACK DSoundEnumDevices(LPGUID guid, LPCSTR desc, LPCSTR drvname,
void alcDSoundInit(BackendFuncs *FuncList)
{
- *FuncList = DSoundFuncs;
+ if(FuncList) *FuncList = DSoundFuncs;
#ifdef _WIN32
ds_handle = LoadLibraryA("dsound.dll");
@@ -522,14 +522,14 @@ void alcDSoundDeinit(void)
#ifdef _WIN32
if(ds_handle)
FreeLibrary(ds_handle);
- ds_handle = NULL;
#endif
+ ds_handle = NULL;
}
void alcDSoundProbe(int type)
{
- if(!ds_handle)
- return;
+ if(!ds_handle) alcDSoundInit(NULL);
+ if(!ds_handle) return;
if(type == DEVICE_PROBE)
AppendDeviceList(dsDevice);