From d976d0293694e1cdab4f46fae5f14463995831c4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 18 Aug 2011 00:13:43 -0700 Subject: Only attempt to load MMDevApi and DSound once, on init --- Alc/mmdevapi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Alc/mmdevapi.c') 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: -- cgit v1.2.3