From dcac0de44ce1856fea0ff2d8d71feb2346aa911c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 26 Dec 2007 17:38:42 -0800 Subject: Allow empty device specifiers when opening; treat them like NULL --- Alc/ALc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Alc/ALc.c') 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) { -- cgit v1.2.3