From 529ff3197ac6b352c10ef4391ba8bc8c18a43ce5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 20 Aug 2011 02:49:15 -0700 Subject: Don't expose "DirectSound Default" in the ALL_DEVICES list This is under the assumption that one of the devices in ALL_DEVICES corresponds to the default. This is not true for all backends (eg, ALSA). --- Alc/backends/dsound.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'Alc') diff --git a/Alc/backends/dsound.c b/Alc/backends/dsound.c index 08a1d13a..8a8ce3bc 100644 --- a/Alc/backends/dsound.c +++ b/Alc/backends/dsound.c @@ -122,18 +122,6 @@ static BOOL CALLBACK DSoundEnumDevices(LPGUID guid, LPCSTR desc, LPCSTR drvname, (void)data; (void)drvname; - if(NumDevices == 0) - { - temp = realloc(DeviceList, sizeof(DevMap) * (NumDevices+1)); - if(temp) - { - DeviceList = temp; - DeviceList[NumDevices].name = strdup(dsDevice); - DeviceList[NumDevices].guid = GUID_NULL; - NumDevices++; - } - } - if(!guid) return TRUE; @@ -289,8 +277,7 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam { if(strcmp(deviceName, DeviceList[i].name) == 0) { - if(i > 0) - guid = &DeviceList[i].guid; + guid = &DeviceList[i].guid; break; } } -- cgit v1.2.3