diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/dsound.c | 7 | ||||
-rw-r--r-- | Alc/mmdevapi.c | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c index 7f1524eb..be111d1d 100644 --- a/Alc/dsound.c +++ b/Alc/dsound.c @@ -273,9 +273,6 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam LPGUID guid = NULL; HRESULT hr; - if(!DSoundLoad()) - return ALC_FALSE; - if(!deviceName) deviceName = dsDevice; else if(strcmp(deviceName, dsDevice) != 0) @@ -612,6 +609,8 @@ static const BackendFuncs DSoundFuncs = { ALCboolean alcDSoundInit(BackendFuncs *FuncList) { + if(!DSoundLoad()) + return ALC_FALSE; *FuncList = DSoundFuncs; return ALC_TRUE; } @@ -636,8 +635,6 @@ void alcDSoundProbe(enum DevProbe type) HRESULT hr; ALuint i; - if(!DSoundLoad()) return; - switch(type) { case DEVICE_PROBE: diff --git a/Alc/mmdevapi.c b/Alc/mmdevapi.c index de845ce0..5abb22c9 100644 --- a/Alc/mmdevapi.c +++ b/Alc/mmdevapi.c @@ -637,9 +637,6 @@ static ALCboolean MMDevApiOpenPlayback(ALCdevice *device, const ALCchar *deviceN MMDevApiData *data = NULL; HRESULT hr; - if(!MMDevApiLoad()) - return ALC_FALSE; - if(!deviceName) deviceName = mmDevice; else if(strcmp(deviceName, mmDevice) != 0) @@ -753,6 +750,8 @@ static const BackendFuncs MMDevApiFuncs = { ALCboolean alcMMDevApiInit(BackendFuncs *FuncList) { + if(!MMDevApiLoad()) + return ALC_FALSE; *FuncList = MMDevApiFuncs; return ALC_TRUE; } @@ -770,8 +769,6 @@ void alcMMDevApiDeinit(void) void alcMMDevApiProbe(enum DevProbe type) { - if(!MMDevApiLoad()) return; - switch(type) { case DEVICE_PROBE: |