aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-26 17:38:42 -0800
committerChris Robinson <[email protected]>2007-12-26 17:38:42 -0800
commitdcac0de44ce1856fea0ff2d8d71feb2346aa911c (patch)
tree196b4430cf5b06ef99462d9ff3609b6cc0035915 /Alc/ALc.c
parent2ee389044bc6ff1a8b066eb70f41cc8ec883f5fa (diff)
Allow empty device specifiers when opening; treat them like NULL
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index b4ec8e9f..fa591174 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -409,6 +409,9 @@ ALCAPI ALCdevice* ALCAPIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, AL
InitAL();
+ if(deviceName && !deviceName[0])
+ deviceName = NULL;
+
pDevice = malloc(sizeof(ALCdevice));
if (pDevice)
{
@@ -1034,6 +1037,9 @@ ALCAPI ALCdevice* ALCAPIENTRY alcOpenDevice(const ALCchar *deviceName)
InitAL();
+ if(deviceName && !deviceName[0])
+ deviceName = NULL;
+
device = malloc(sizeof(ALCdevice));
if (device)
{